Code Monkey home page Code Monkey logo

rdl-editor's People

Contributors

eyck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rdl-editor's Issues

repeated `#includes`

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

trailing `#endif` in generated header

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

Add to readme how to run and open the application

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?

standalone generator

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

[feature request] default values, read/write masks?

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.