minres / rdl-editor Goto Github PK
View Code? Open in Web Editor NEWA Xtext based SystemRDL editor with syntax highlighting and context sensitive help
Home Page: https://minres.github.io/RDL-Editor/
License: Eclipse Public License 1.0
A Xtext based SystemRDL editor with syntax highlighting and context sensitive help
Home Page: https://minres.github.io/RDL-Editor/
License: Eclipse Public License 1.0
not really an issue but would be nice if this could be resolved. Issue is if the RDL file instantiates k>1 instances of a regfile
def then we get corresponding k #includes
. For example, consider
regfile i2c_channel {
reg {
name = "RX_SADDR";
desc = "uDMA RX I2C buffer base address configuration register.";
regwidth=32;
field {
name = "RX_SADDR";
fieldwidth = 32;
} RX_SADDR =0;
} RX_SADDR @0x0;
reg {
name = "RX_SIZE";
desc = "uDMA RX I2C buffer size configuration register.";
regwidth=32;
field {
name = "RX_SIZE";
fieldwidth = 32;
} RX_SIZE =0;
} RX_SIZE @0x4;
reg {
name = "RX_CFG";
desc = "uDMA RX I2C stream configuration register.";
regwidth=32;
field {
name = "CLR";
} CLR[6:6] =0;
field {
name = "PENDING";
} PENDING[5:5] =0;
field {
name = "EN";
} EN[4:4] =0;
field {
name = "DATASIZE";
} DATASIZE[2:1] =0;
field {
name = "CONTINOUS";
} CONTINOUS[0:0] =0;
} RX_CFG @0x8;
reg {
name = "TX_SADDR";
desc = "uDMA TX I2C buffer base address configuration register.";
regwidth=32;
field {
name = "TX_SADDR";
fieldwidth = 32;
} TX_SADDR =0;
} TX_SADDR @0x10;
reg {
name = "TX_SIZE";
desc = "uDMA TX I2C buffer size configuration register.";
regwidth=32;
field {
name = "TX_SIZE";
fieldwidth = 32;
} TX_SIZE =0;
} TX_SIZE @0x14;
reg {
name = "TX_CFG";
desc = "uDMA TX I2C stream configuration register.";
regwidth=32;
field {
name = "CLR";
} CLR[6:6] =0;
field {
name = "PENDING";
} PENDING[5:5] =0;
field {
name = "EN";
} EN[4:4] =0;
field {
name = "DATASIZE";
} DATASIZE[2:1] =0;
field {
name = "CONTINOUS";
} CONTINOUS[0:0] =0;
} TX_CFG @0x18;
reg {
name = "CMD_SADDR";
desc = "uDMA CMD I2C buffer base address configuration register.";
regwidth=32;
field {
name = "CMD_SADDR";
fieldwidth = 32;
} CMD_SADDR =0;
} CMD_SADDR @0x20;
reg {
name = "CMD_SIZE";
desc = "uDMA CMD I2C buffer size configuration register.";
regwidth=32;
field {
name = "CMD_SIZE";
fieldwidth = 32;
} CMD_SIZE = 0;
} CMD_SIZE @0x24;
reg {
name = "CMD_CFG";
desc = "uDMA CMD I2C stream configuration register.";
regwidth=32;
field {
name = "CLR";
} CLR[6:6] =0;
field {
name = "PENDING";
} PENDING[5:5] =0;
field {
name = "EN";
} EN[4:4] =0;
field {
name = "DATASIZE";
} DATASIZE[2:1] =0;
field {
name = "CONTINOUS";
} CONTINOUS[0:0] =0;
} CMD_CFG @0x28;
reg {
name = "STATUS";
desc = "uDMA I2C Status register.";
regwidth=32;
field {
name = "ACK";
} ACK[2:2] =0;
field {
name = "ARB_LOST";
} ARB_LOST[1:1] =0;
field {
name = "CONTINOUS";
} BUSY[0:0] =0;
} STATUS @0x30;
reg {
name = "SETUP";
desc = "uDMA I2C Configuration register.";
regwidth=32;
field {
name = "DO_RST";
} DO_RST[0:0] =0;
} SETUP @0x34;
} i2c0 @0x180;
i2c_channel i2c1 @0x200;
as seen i2c_channel
is instantiated twice. In the generated header, we correspondingly get
// ...
#include "i2c_channel.h"
#include "i2c_channel.h"
// ...
perhaps the 2nd #include
in above could be avoided
could be mistake from my side, but when i am running the new release of standalone generator, such as
$ java -jar /opt/com.minres.rdl.standalone-1.4.1.jar -o "generated-src" -sc -n "vpvper::pulpissimo" interrupt.rdl
then generated header now uses #pragma once
which is fine but the trailing #endif
is still present at the end of generated code which raises compilation errors later in build
perhaps already possible but could not get it to work yet. Is it possible that the standalone generator considers the default values and read/write masks config from RDL description into generated code (perhaps in the generated constructor). For example, generate
inline vpvper::pulpissimo::gen::spi_channel_regs::spi_channel_regs(sc_core::sc_module_name nm)
: sc_core::sc_module(nm),
NAMED(SPIM_RX_CFG, r_SPIM_RX_CFG, 0x4, *this, 0xffffffbf, 0xffffffdf),
NAMED(SPIM_CMD_CFG, r_SPIM_CMD_CFG, 0x4, *this, 0xffffffbf, 0xffffffdf) {}
instead of
inline vpvper::pulpissimo::gen::spi_channel_regs::spi_channel_regs(sc_core::sc_module_name nm)
: sc_core::sc_module(nm),
NAMED(SPIM_RX_CFG, r_SPIM_RX_CFG, 0, *this),
NAMED(SPIM_CMD_CFG, r_SPIM_CMD_CFG, 0, *this) {}
if default, read/write masks specified in RDL description
I have downloaded the MacOS source release and have tried running the application, but I get the error:
The Eclipse executable launcher was unable to locate its
companion shared library.
Any tips?
I am using the standalone-generator tool for Pulpissimo peripherals. I have a feature request. Currently the tool correctly generates the functional stub for peripheral X having a function registerResources()
found in gen/x.h
namespace foo {
class x_regs:
public sc_core::sc_module,
public scc:resetable
{
// ...
template<unsigned BUSWIDTH=32>
void registerResources(scc::tlm_target<BUSWIDTH>& target, uint64_t offset=0);
};
template<unsigned BUSWIDTH>
inline void foo::gen::x_regs::registerResources(scc::tlm_target<BUSWIDTH>& target, uint64_t offset) {
target.addResource(XYZ, 0x0UL);
target.addResource(ABC, 0x4UL);
// ...
}
}
i would request to use offset
in implementation like in the following
template<unsigned BUSWIDTH>
inline void foo::gen::x_regs::registerResources(scc::tlm_target<BUSWIDTH>& target, uint64_t offset) {
target.addResource(XYZ, 0x0UL + offset);
target.addResource(ABC, 0x4UL + offset);
// ...
}
if there are strong reasons to avoid this then maybe a CLI switch could be provided (like -ns
for namespace) to enable this. Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.