Code Monkey home page Code Monkey logo

peakrdl-systemrdl's People

Contributors

amykyta3 avatar

Watchers

 avatar

peakrdl-systemrdl's Issues

Add support for reference assignments

Generate component & property reference DPAs if encountered.

Except for signals, these are implicitly DPAs and therefore need to be collected during traversal, and then emitted after the enclosing component instantiation is generated.

Import SystemRDLExporter in __init__.py

Hi,

I needed to add the following lines to init.py to get SystemRDLExporter to work like the other Exporter tools.

from .__about__ import __version__

from .exporter import SystemRDLExporter

Enumerated type is not exported

Hi, I'm using the ip-exact importer and exporting to systemrdl, and the enumerated definition is not being exported.

  • input file my_subblock.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by PeakRDL IP-XACT-->
<ipxact:component xmlns:ipxact="http://www.accellera.org/XMLSchema/IPXACT/1685-2014" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.accellera.org/XMLSchema/IPXACT/1685-2014 http://www.accellera.org/XMLSchema/IPXACT/1685-2014/index.xsd">
  <ipxact:vendor>example.org</ipxact:vendor>
  <ipxact:library>mylibrary</ipxact:library>
  <ipxact:name>my_subblock</ipxact:name>
  <ipxact:version>1.0</ipxact:version>
  <ipxact:memoryMaps>
    <ipxact:memoryMap>
      <ipxact:name>my_subblock_mmap</ipxact:name>
      <ipxact:addressBlock>
        <ipxact:name>my_subblock</ipxact:name>
        <ipxact:baseAddress>'h0</ipxact:baseAddress>
        <ipxact:range>'h110</ipxact:range>
        <ipxact:width>32</ipxact:width>
        <ipxact:register>
          <ipxact:name>reg1</ipxact:name>
          <ipxact:addressOffset>'h0</ipxact:addressOffset>
          <ipxact:size>32</ipxact:size>
          <ipxact:field>
            <ipxact:name>f1</ipxact:name>
            <ipxact:bitOffset>0</ipxact:bitOffset>
            <ipxact:enumeratedValues>
              <ipxact:enumeratedValue>
                <ipxact:name>EMPTY</ipxact:name>
                <ipxact:displayName>EMPTY</ipxact:displayName>
                <ipxact:description>RX-FIFO empty</ipxact:description>
                <ipxact:value>'h0</ipxact:value>
              </ipxact:enumeratedValue>
              <ipxact:enumeratedValue>
                <ipxact:name>NOT_EMPTY</ipxact:name>
                <ipxact:displayName>NOT_EMPTY</ipxact:displayName>
                <ipxact:description>RX-FIFO not empty.</ipxact:description>
                <ipxact:value>'h1</ipxact:value>
              </ipxact:enumeratedValue>
            </ipxact:enumeratedValues>
            <ipxact:resets>
              <ipxact:reset>
                <ipxact:value>'h0</ipxact:value>
              </ipxact:reset>
            </ipxact:resets>
            <ipxact:bitWidth>1</ipxact:bitWidth>
            <ipxact:volatile>true</ipxact:volatile>
            <ipxact:access>read-write</ipxact:access>
          </ipxact:field>
          <ipxact:field>
            <ipxact:name>f2</ipxact:name>
            <ipxact:bitOffset>8</ipxact:bitOffset>
            <ipxact:resets>
              <ipxact:reset>
                <ipxact:value>'h7b</ipxact:value>
              </ipxact:reset>
            </ipxact:resets>
            <ipxact:bitWidth>8</ipxact:bitWidth>
            <ipxact:volatile>true</ipxact:volatile>
            <ipxact:access>read-write</ipxact:access>
          </ipxact:field>
        </ipxact:register>
      </ipxact:addressBlock>
    </ipxact:memoryMap>
  </ipxact:memoryMaps>
</ipxact:component>
  • command
peakrdl systemrdl my_subblock.xml -o my_subblock.rdl
  • output file my_subblock.rdl
addrmap my_subblock__my_subblock_mmap {
    addrmap {
        reg {
            regwidth = 0x20;
            field {
                sw = rw;
                encode = f1_enum_t;
            } f1[0:0] = 0x0;
            field {
                sw = rw;
            } f2[15:8] = 0x7B;
        } reg1 @ 0x0;
    } my_subblock @ 0x0;
};

Field f1 has the encode property pointing to the expected enum type, but the type is not defined.
I'm mostly sure the problem is with the systemrdl exporter because exporting from ip-xact to ip-xact or from systemrdl (with the enum added by hand) to ip-xact show the values correctly.

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.