Git Product home page Git Product logo

duh-ipxact's Introduction

NPM version Actions Status

IP-XACT import / export package

Use

duh-ipxact <command>

Commands:
  duh-ipxact duh2spirit14 duh [spirit]  convert DUH file to Spirit 1.4 file
  duh-ipxact duh2spirit duh [spirit]    convert DUH file to Spirit 2009 file
  duh-ipxact ipxact2duh ipxact [duh]    convert IPXACT file to DUH file
  duh-ipxact fetch                      download IPXACT, SPIRIT schemas

Options:
  --version      Show version number                                   [boolean]
  --verbose, -v                                                 [default: false]
  --help         Show help                                             [boolean]

DUH -> SPIRIT

npx duh-ipxact duh2spirit <myDuh>.json5 <mySpirit>.xml

IPXACT -> DUH

npx duh-ipxact ipxact2duh <myIpxact>.xml <myDuh>.json5

Fetch IPXACT schemas

npx duh-ipxact fetch

Validate SPIRIT file

xmllint --schema accellera.org/XMLSchema/SPIRIT/1685-2009/index.xsd <mySpirit>.xml

Validate IPXACT file

xmllint --schema accellera.org/XMLSchema/IPXACT/1685-2014/index.xsd <myIpxact>.xml

License

Apache 2.0 LICENSE.

duh-ipxact's People

Contributors

drom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

duh-ipxact's Issues

"Error [ERR_REQUIRE_ESM]: require() " reported from duh-ipxact

Hi Aliaksei ,

Thanks for your dut-* related tools, and I'm trying it to conver IP-XACT to DUH in my local, however there is below error. Would you please help have a lookt at it? Thanks

Step 1,
Downloaded https://nodejs.org/dist/v16.17.0/node-v16.17.0-linux-x64.tar.xz, and unpack it in my home directory, and set below in my terminal

export PATH=/home/cad/node-v16.17.0-linux-x64/bin:$PATH
Step 2,
hit below command to install duh-ipxact

npm i -g duh-ipxact
Step 3,
Use this ip-xact as an example to convert it to DUH format, https://github.com/klauspetersen/ipxact/blob/master/example/axi_motor_v2_00_a.xml

npx duh-ipxact ipxact2duh axi_motor_v2_00_a.xml axi_motor_v2_00_a.json5

And now there is below errors:

$ npx duh-ipxact ipxact2duh axi_motor_v2_00_a.xml axi_motor_v2_00_a.json5
/home/cad/node-v16.17.0-linux-x64/lib/node_modules/duh-ipxact/bin/duh-ipxact.js:8
const fetch = require('node-fetch');
              ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /home/cad/node-v16.17.0-linux-x64/lib/node_modules/duh-ipxact/node_modules/node-fetch/src/index.js from /home/cad/node-v16.17.0-linux-x64/lib/node_modules/duh-ipxact/bin/duh-ipxact.js not supported.
Instead change the require of index.js in /home/cad/node-v16.17.0-linux-x64/lib/node_modules/duh-ipxact/bin/duh-ipxact.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/home/cad/node-v16.17.0-linux-x64/lib/node_modules/duh-ipxact/bin/duh-ipxact.js:8:15) {
  code: 'ERR_REQUIRE_ESM'
}

I've got below page,
https://stackoverflow.com/questions/69087292/requirenode-fetch-gives-err-require-esm

it says,

If you want to require it, then downgrade to v2.

However, in package.json the dependencies part includes:
"node-fetch": "^3.2.8",
So, do I miss something in my local?

Thanks Aliaksei very much!

port width extraction from IPXACT 2014

The width of the following port should be extracted as 8.

IPXACT 2014 compliant definition

...
  <ipxact:ports>
    <ipxact:port>
      <ipxact:name>addr</ipxact:name>
        <ipxact:wire>
          <ipxact:direction>in</ipxact:direction>
          <ipxact:vectors>
            <ipxact:vector>
              <ipxact:left>7</ipxact:left>
              <ipxact:right>0</ipxact:right>
            </ipxact:vector>
          </ipxact:vectors>
        </ipxact:wire>
...

memoryMapRef support

While converting IPXACT document:

<ipxact:slave>
  <ipxact:memoryMapRef memoryMapRef="memory_map_1"/>
</ipxact:slave>

Convert into following DUH structure.

{
  ...
  busInterfaces: [{
    name: 'bus_interface_1',
    ...,
    interfaceMode: 'target',
    memoryMapRef: 'memory_map_1'
  }]
}

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.