Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

duh-ipxact

Package Overview
Dependencies
Maintainers
3
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

duh-ipxact - npm Package Compare versions

Comparing version 0.8.0 to 0.9.0

71

lib/duh2spirit.js

@@ -48,19 +48,22 @@ 'use strict';

const fields = node => node.map(e => [$.field]
.concat(attr(e, 'name description bitOffset bitWidth access modifiedWriteValue readAction'))
.concat(enumeratedValues(e))
);
.concat(
attr(e, 'name description bitOffset bitWidth access modifiedWriteValue readAction'),
enumeratedValues(e)
));
const registers = node => node.map(e => [$.register]
.concat(attr(e, 'name description addressOffset size volatile'))
.concat([[$.reset,
[$.value, toHex(e.resetValue)],
[$.mask, toHex(e.resetMask)]
]])
.concat(fields(e.fields))
);
.concat(
attr(e, 'name description addressOffset size volatile'),
[[$.reset,
[$.value, toHex(e.resetValue)],
[$.mask, toHex(e.resetMask)]
]],
fields(e.fields)
));
const addressBlocks = node => node.map(e => [$.addressBlock]
.concat(attr(e, 'name baseAddress range width'))
.concat(registers(e.registers))
);
.concat(
attr(e, 'name baseAddress range width usage'),
registers(e.registers || [])
));

@@ -98,2 +101,13 @@ const memoryMaps = node => [$.memoryMaps]

const cpus = comp => {
const els = comp.cpus || [];
if (els.length === 0) {
return [];
}
return [[$.cpus].concat(comp.cpus.map(cpu => [$.cpu,
[$.name, cpu.name],
[$.addressSpaceRef, {[$.addressSpaceRef]: cpu.addressSpaceRef}]
]))];
};
const busInterfaces = comp => {

@@ -110,13 +124,13 @@ const bis = comp.busInterfaces || [];

[$.busType, {
'spirit:vendor': bi.busType.vendor,
'spirit:library': bi.busType.library,
'spirit:name': bi.busType.name,
'spirit:version': bi.busType.version
[$.vendor]: bi.busType.vendor,
[$.library]: bi.busType.library,
[$.name]: bi.busType.name,
[$.version]: bi.busType.version
}],
[$.abstractionType, {
'spirit:vendor': abstractionRef.vendor,
'spirit:library': abstractionRef.library,
'spirit:name': abstractionRef.name,
'spirit:version': abstractionRef.version
}],
[$.vendor]: abstractionRef.vendor,
[$.library]: abstractionRef.library,
[$.name]: abstractionRef.name,
[$.version]: abstractionRef.version
}]
].concat(

@@ -130,8 +144,11 @@ isInitiator(bi) ? [[$.master]] : [],

module.exports = (node, version) =>
component(node.component, version || 'spirit14')
module.exports = (node, version) => {
const comp = node.component;
return component(comp, version || 'spirit14')
.concat(
busInterfaces(node.component),
[memoryMaps(node.component.memoryMaps || [])],
modelPorts(node.component)
cpus(comp),
busInterfaces(comp),
[memoryMaps(comp.memoryMaps || [])],
modelPorts(comp)
);
};

@@ -6,2 +6,5 @@ 'use strict';

vendor library name version
cpus
cpu
addressSpaceRef
busInterfaces

@@ -17,3 +20,3 @@ busInterface

baseAddress
range width
range width usage
register

@@ -20,0 +23,0 @@ addressOffset size

{
"name": "duh-ipxact",
"version": "0.8.0",
"version": "0.9.0",
"description": "IP-XACT import / export package",

@@ -5,0 +5,0 @@ "author": "SiFive",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc