#include "kernel/register.h"
#include "kernel/log.h"
#include <sstream>
#include <algorithm>
#include <stdlib.h>
Go to the source code of this file.
Definition at line 29 of file memory_unpack.cc.
31 log(
"Creating $memrd and $memwr for memory `%s' in module `%s':\n",
36 while (module->
memories.count(mem_name) != 0)
46 int abits = memory->
parameters.at(
"\\ABITS").as_int();
47 int num_rd_ports = memory->
parameters.at(
"\\RD_PORTS").as_int();
48 int num_wr_ports = memory->
parameters.at(
"\\WR_PORTS").as_int();
50 for (
int i = 0; i < num_rd_ports; i++)
64 for (
int i = 0; i < num_wr_ports; i++)
const char * c_str() const
std::string stringf(const char *fmt,...)
RTLIL::Cell * addCell(RTLIL::IdString name, RTLIL::IdString type)
RTLIL::Const as_const() const
void setPort(RTLIL::IdString portname, RTLIL::SigSpec signal)
std::map< RTLIL::IdString, RTLIL::Memory * > memories
std::map< RTLIL::IdString, RTLIL::Const > parameters
static std::string escape_id(std::string str)
const RTLIL::SigSpec & getPort(RTLIL::IdString portname) const
void remove(const std::set< RTLIL::Wire * > &wires)
void log(const char *format,...)
RTLIL::SigSpec extract(const RTLIL::SigSpec &pattern, const RTLIL::SigSpec *other=NULL) const
YOSYS_NAMESPACE_BEGIN int autoidx
Definition at line 82 of file memory_unpack.cc.
84 std::vector<RTLIL::IdString> memcells;
85 for (
auto &cell_it : module->
cells_)
86 if (cell_it.second->type ==
"$mem" && design->
selected(module, cell_it.second))
87 memcells.push_back(cell_it.first);
88 for (
auto &it : memcells)
bool selected(T1 *module) const
USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN void handle_memory(RTLIL::Module *module, RTLIL::Cell *memory)
std::map< RTLIL::IdString, RTLIL::Cell * > cells_