kactus2 / kactus2dev Goto Github PK
View Code? Open in Web Editor NEWKactus2 is a graphical EDA tool based on the IP-XACT standard.
Home Page: https://research.tuni.fi/system-on-chip/tools/
License: GNU General Public License v2.0
Kactus2 is a graphical EDA tool based on the IP-XACT standard.
Home Page: https://research.tuni.fi/system-on-chip/tools/
License: GNU General Public License v2.0
It seems the context menu options on an IP-XACT Instance does not work on Linux Builds:
Does Qt need support from the environment to launch a file manager window, default system text editor.
In lock mode, the scrollbars of the editor widows are disabled.
Long lists of elements (Block/Register/Fields..) could not be reviewed. Also a long descriptive text will not be displayed completely. That is especially an issue with smaller screens.
Would be nice if the whole content remains readable in lock mode.
Opening Settings->Plugins shows the list of available plugins, but selecting an item in the tree shows the details of the wrong plugin in the information listing at the bottom of the window.
If a model with a very large memoryMap is loaded, it can take up to 10 mins just to display the main display tab. When clicking between registers there is also a significant delay between the click and when the form is actually displayed.
I ran some basic profiling and saw that the majority of the CPU cycles are taken up be the visualizer on the right hand side trying to refresh. If you shrink said visualizer until it disappears, the GUI becomes much more responsive.
The only models that I have used large enough to cause this issue contain nested register files, so I'm not sure if the root cause is just the number of visualization elements, or if it has something to do with how changes propagate through the registerFile.
./configure completes fine
make ends with:
.....
g++ -c -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DIPXACTMODELS_LIB -DQT_NO_CAST_FROM_ASCII -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_XML_LIB -DQT_CORE_LIB -I. -IGeneratedFiles -I. -I./GeneratedFiles/Release -I.. -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtCore -IGeneratedFiles/release -isystem /usr/include/libdrm -I/usr/lib64/qt5/mkspecs/linux-g++ -o release/XmlUtils.o utilities/XmlUtils.cpp
g++ -c -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DIPXACTMODELS_LIB -DQT_NO_CAST_FROM_ASCII -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_XML_LIB -DQT_CORE_LIB -I. -IGeneratedFiles -I. -I./GeneratedFiles/Release -I.. -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtCore -IGeneratedFiles/release -isystem /usr/include/libdrm -I/usr/lib64/qt5/mkspecs/linux-g++ -o release/BusDefinitionUtils.o utilities/BusDefinitionUtils.cpp
utilities/BusDefinitionUtils.cpp: In function ‘QStringList BusDefinitionUtils::getSystemGroups(QSharedPointer, LibraryInterface*)’:
utilities/BusDefinitionUtils.cpp:26:40: error: invalid initialization of non-const reference of type ‘VLNV&’ from an rvalue of type ‘VLNV’
VLNV& extendVLNV = bus->getExtends();
^
In file included from ../IPXACTmodels/common/Document.h:20:0,
from ../IPXACTmodels/BusDefinition/BusDefinition.h:17,
from utilities/BusDefinitionUtils.cpp:14:
../IPXACTmodels/common/VLNV.h: In instantiation of ‘static void* QtMetaTypePrivate::QMetaTypeFunctionHelper<T, Accepted>::Construct(void*, const void*) [with T = VLNV; bool Accepted = true]’:
/usr/include/qt5/QtCore/qmetatype.h:1687:76: required from ‘int qRegisterNormalizedMetaType(const QByteArray&, T*, typename QtPrivate::MetaTypeDefinedHelper<T, (QMetaTypeId2::Defined && (! QMetaTypeId2::IsBuiltIn))>::DefinedType) [with T = VLNV; typename QtPrivate::MetaTypeDefinedHelper<T, (QMetaTypeId2::Defined && (! QMetaTypeId2::IsBuiltIn))>::DefinedType = QtPrivate::MetaTypeDefinedHelper<VLNV, true>::DefinedType]’
/usr/include/qt5/QtCore/qmetatype.h:1712:77: required from ‘int qRegisterMetaType(const char*, T*, typename QtPrivate::MetaTypeDefinedHelper<T, (QMetaTypeId2::Defined && (! QMetaTypeId2::IsBuiltIn))>::DefinedType) [with T = VLNV; typename QtPrivate::MetaTypeDefinedHelper<T, (QMetaTypeId2::Defined && (! QMetaTypeId2::IsBuiltIn))>::DefinedType = QtPrivate::MetaTypeDefinedHelper<VLNV, true>::DefinedType]’
../IPXACTmodels/common/VLNV.h:263:1: required from here
../IPXACTmodels/common/VLNV.h:88:2: warning: unused parameter ‘other’ [-Wunused-parameter]
VLNV(VLNV const& other) = default;
^
In file included from /usr/include/qt5/QtCore/qobject.h:54:0,
from /usr/include/qt5/QtCore/qsharedpointer_impl.h:64,
from /usr/include/qt5/QtCore/qsharedpointer.h:48,
from /usr/include/qt5/QtCore/QSharedPointer:1,
from ../IPXACTmodels/ipxactmodels_global.h:4,
from utilities/BusDefinitionUtils.h:15,
from utilities/BusDefinitionUtils.cpp:12:
/usr/include/qt5/QtCore/qmetatype.h:765:59: note: synthesized method ‘VLNV::VLNV(const VLNV&)’ first required here
return new (where) T(static_cast<const T>(t));
^
make[1]: *** [release/BusDefinitionUtils.o] Error 1
make[1]: Leaving directory `/share/cac/kactus2dev-master/IPXACTmodels'
make: *** [sub-IPXACTmodels-IPXACTmodels-pro-make_first-ordered] Error 2
I have some IP-XACT from some IP that is using expressions of the form:
ipxact:mask('ffffffff) / $pow(2,0) % $pow(2,32)</ipxact:mask>
This is a quite strange yet effective way of doing this but it comes from converting 2009 files to 2014 using Accellera's updater XSLs (https://accellera.org/downloads/standards/ip-xact). Kactus2 does its best here but what I see from the mask example above is the result in tooltip;
'hffffffff80000000
.. which flagged as user error since the register width is only 32 bits. It seems in error vs the spec (C.3.6.2) where for unsignedBitVectorExpression, "the length of the bit vector is based on the width of the containing object" (32, then) but we're treating this as a (signed) sign extended 64 bit value here due to the pow(2,32). Would this be a fair assessment?
Windows installer.
Error message:
The program can't start because python38.dll is missing from your computer. Try reinstalling the program to fix this problem.
The generic block in the file had a comment such as:
DPC_CONFIG_MASK : integer:= 2**DPC_CONFIG_0_INDEX; -- cfg_dpc_config_in(20);
This caused the lines following it up to the port list to be ignored. Once I removed the brackets, the parameters imported properly.
The latest release tag is https://github.com/kactus2/kactus2dev/releases/tag/v3.9.0, and it is far behind the master branch.
This may brings problems to many Linux distributions that want to use the latest version of the package. Could an updated release tag be issued if it is convenient? Thank you!
The README states that a minimum Python version of 3.10 is required to build Kactus2 on Linux. This is a totally unreasonable expectation for a tool meant to be used by professionals, which are mostly stuck with whatever version of Python comes with the latest version of RHEL (3.6 on RHEL8).
If the Python API is an optional component, or could be made an optional component, and slackening the Python version requirement is not possible, please update the build scripts to make building the Python API optional.
If a memoryMap field contains multiple reset elements, all but one will be lost when the model is loaded and then saved by Kactus.
I'm not concerned that the GUI only displays a single reset value, I am mostly concerned with the fact that the additional resets are silently lost after a save.
Getting a different error message when I recompile
End of make ouput:
/usr/include/qt5/QtCore/qsharedpointer_impl.h:479:55: required from 'void QSharedPointer<T>::internalConstruct(X*, Deleter) [with X = AddressBlockValidator; Deleter = QtSharedPointer::NormalDeleter; T = AddressBlockValidator]'
/usr/include/qt5/QtCore/qsharedpointer_impl.h:316:24: required from 'QSharedPointer<T>::QSharedPointer(X*) [with X = AddressBlockValidator; typename std::enable_if<std::is_convertible<_Up*, _Tp*>::value, bool>::type <anonymous> = true; T = AddressBlockValidator]'
PythonAPI.cpp:531:90: required from here
/usr/include/qt5/QtCore/qsharedpointer_impl.h:187:26: warning: deleting object of polymorphic class type 'AddressBlockValidator' which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]
187 | void execute() { delete ptr; }
| ^~~~~~~~~~
/usr/include/qt5/QtCore/qsharedpointer_impl.h: In instantiation of 'void QtSharedPointer::CustomDeleter<T, QtSharedPointer::NormalDeleter>::execute() [with T = SubspaceMapValidator]':
/usr/include/qt5/QtCore/qsharedpointer_impl.h:205:36: required from 'static void QtSharedPointer::ExternalRefCountWithCustomDeleter<T, Deleter>::deleter(QtSharedPointer::ExternalRefCountData*) [with T = SubspaceMapValidator; Deleter = QtSharedPointer::NormalDeleter]'
/usr/include/qt5/QtCore/qsharedpointer_impl.h:479:55: required from 'void QSharedPointer<T>::internalConstruct(X*, Deleter) [with X = SubspaceMapValidator; Deleter = QtSharedPointer::NormalDeleter; T = SubspaceMapValidator]'
/usr/include/qt5/QtCore/qsharedpointer_impl.h:316:24: required from 'QSharedPointer<T>::QSharedPointer(X*) [with X = SubspaceMapValidator; typename std::enable_if<std::is_convertible<_Up*, _Tp*>::value, bool>::type <anonymous> = true; T = SubspaceMapValidator]'
PythonAPI.cpp:534:73: required from here
/usr/include/qt5/QtCore/qsharedpointer_impl.h:187:26: warning: deleting object of polymorphic class type 'SubspaceMapValidator' which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]
make[1]: *** [Makefile:544: release/PythonAPI.o] Error 2
make[1]: Leaving directory '/home/olof/projects/kactus2/kactus2dev/PythonAPI'
make: *** [Makefile:111: sub-PythonAPI-make_first] Error 2
I'm getting some errors when I compile Kactus2 under Ubuntu 20.04. The end of the Makefile output looks like
cd Plugins/LinuxDeviceTree/ && ( test -e Makefile.LinuxDeviceTreeGenerator || /usr/lib/qt5/bin/qmake -o Makefile.LinuxDeviceTreeGenerator /mnt/gentoo/home/olof/projects/kactus2dev/Plugins/LinuxDeviceTree/LinuxDeviceTreeGenerator.pro ) && make -f Makefile.LinuxDeviceTreeGenerator
make[1]: Entering directory '/mnt/gentoo/home/olof/projects/kactus2dev/Plugins/LinuxDeviceTree'
Makefile.LinuxDeviceTreeGenerator:1140: warning: overriding recipe for target 'release/qrc_LinuxDeviceTree.o'
Makefile.LinuxDeviceTreeGenerator:831: warning: ignoring old recipe for target 'release/qrc_LinuxDeviceTree.o'
Makefile.LinuxDeviceTreeGenerator:1143: warning: overriding recipe for target 'release/moc_ComponentInstanceParameterFinder.o'
Makefile.LinuxDeviceTreeGenerator:819: warning: ignoring old recipe for target 'release/moc_ComponentInstanceParameterFinder.o'
Makefile.LinuxDeviceTreeGenerator:1146: warning: overriding recipe for target 'release/moc_ParameterCache.o'
Makefile.LinuxDeviceTreeGenerator:828: warning: ignoring old recipe for target 'release/moc_ParameterCache.o'
Makefile.LinuxDeviceTreeGenerator:1149: warning: overriding recipe for target 'release/moc_LinuxDeviceTreeDialog.o'
Makefile.LinuxDeviceTreeGenerator:822: warning: ignoring old recipe for target 'release/moc_LinuxDeviceTreeDialog.o'
Makefile.LinuxDeviceTreeGenerator:1152: warning: overriding recipe for target 'release/moc_LinuxDeviceTreePlugin.o'
Makefile.LinuxDeviceTreeGenerator:825: warning: ignoring old recipe for target 'release/moc_LinuxDeviceTreePlugin.o'
make[1]: *** No rule to make target 'GeneratedFiles/moc_ComponentInstanceParameterFinder.cpp', needed by 'release/moc_ComponentInstanceParameterFinder.o'. Stop.
make[1]: Leaving directory '/mnt/gentoo/home/olof/projects/kactus2dev/Plugins/LinuxDeviceTree'
make: *** [Makefile:563: sub-Plugins-LinuxDeviceTree-LinuxDeviceTreeGenerator-pro-make_first] Error 2
I'm a bit confused because GeneratedFiles/moc_ComponentInstanceParameterFinder.cpp
does exist in the build tree. Also, the Kactus2 executable seems to be succesfully built because I can start it without issues
I'm trying to use and install Kactus2-3.10.0 on Ventura 13.1 OS on Intel-Based 64 bit Mac.. Would someone happen to have build & install instructions for MacOS?
I tried the below steps but I get error. Could someone help identify the issue?
ld: warning: directory not found for option '-Lx64/executable'
Undefined symbols for architecture x86_64:
"_PyArg_UnpackTuple", referenced from:
SwigPyObject_own(_object*, _object*) in PythonAPI_wrap.o
"_PyBool_FromLong", referenced from:
_wrap_SwigPyIterator_equal(_object*, object*) in PythonAPI_wrap.o
wrap_SwigPyIterator___eq(_object*, object*) in PythonAPI_wrap.o
wrap_SwigPyIterator___ne(_object*, _object*) in PythonAPI_wrap.o
....
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [libPythonAPI.1.0.0.dylib] Error 1
Steps followed:
Install XCode from App Store on MAC
Install home-brew
Close terminal and open new one
brew install qt5
brew install swig
brew install [email protected]
Download kactus2 tar from sourceforge (linux tar) link that is mentioned in https://github.com/kactus2/kactus2dev
Unzip the tar and cd into it
In qmake.conf, change LOCAL _INSTALL_DIR to one of your home dir path where you want the installation of kactus2
In file “configure":
make fails
Thanks
Abktm
Verilog Generator is designed to retain module implementation when overwriting an exisiting verilog file. The target file contents are checked only when the output directory path is changed, but not when the file name is changed in the "Output files" table. However, on changing the directory path, the file names are reset to ".v". Consequently the feature only works if the target filename matches ".v".
TODO:
Running Kactus2.exe fails with "python38.dll" not found.
Overwriting the Python installation at program directory with WinPython64 3.8.10 (Last 3.8 cPython) fixes the problem.
I*ve got an error when compiling kactus2 with python3.7, that it cannot find Python.h although I've installed it. The reason is, that - at least on my distribution, Ubuntu 18.04 - python3.7-config doesn't know the --embed
command line argument. It will just print the usage. please update the readme file accordingly.
The VHDL generate uses the value instead of the parameter equation for the port signal std_logic_vector. I think the Verilog works fine.
I also might expect a generic section with the parameters and the default should probably be the value or value function. The verilog generate has the parameters but does not list the actual values or value function from the component.
Thanks,
Tony
Kactus2 3.9.171 64bit Windows
It's slow at importing a large number of ports. Once they are imported, it is very slow at getting to the portmaps for the bus interface. Perhaps the algorithms can be improved because I think it gets exponentially slower as you add ports. It does not seem to be multithreaded to use more cores. The task can take minutes to 10 minutes or more (still waiting). It was previously slow with 300 ports and I'm not sure how slow it will be with close to 1000 ports so now I have lots of time to write this issue.
Great program though and I'm still trying to learn it. I'm hoping I can use it to manage a top level design. It has a lot of AMBA registers so it has lots of field signals going to the AMBA block.
Cheers,
Tony
I'm getting the following error when using the Python API
Scanning library. Please wait...
Ready.
Validating items. Please wait...
========== Library integrity check complete ==========
Total library object count: 6
Total file count in the library: 0
Ready.
Updating library view. Please wait...
Ready.
Python 3.8.10 (default, Nov 26 2021, 20:14:08)
[GCC 9.3.0]
Could not import Kactus2 PythonAPI.
Traceback (most recent call last):
File "/mnt/gentoo/home/olof/projects/kactus2/kactus2dev/PythonAPI/pythonAPI.py", line 15, in <module>
import _pythonAPI
ImportError: libKactus2.so: cannot dynamically load position-independent executable
After some digging it seems like libKactus2.so is just a renamed kactus2 binary and modern Linux doesn't allow loading executables as binaries.
A quick (and probably not recommended) workaround that I found here is to pretend it's not an executable with a small python hack
import lief
path = "libKactus2.so"
bin_ = lief.parse(path)
bin_[lief.ELF.DYNAMIC_TAGS.FLAGS_1].remove(lief.ELF.DYNAMIC_FLAGS_1.PIE)
bin_.write(path)
The proper solution would be to separate the library from the executable
If you have a component placed with no connections and try to generate the VHDL (and probably others) then the program crashes without warning. I'm very new to this program and I'm trying to figure it out but I believe this should be easy to replicate and verify.
I've imported a VHLD component which adds the type to the ports.
library IEEE;
use IEEE.STD_LOGIC_1164.all;
use IEEE.STD_LOGIC_arith.all;
use IEEE.STD_LOGIC_unsigned.all;
entity DIG_TOP is
port (
clk_in : in std_logic;
rstb_in : in std_logic
);
end DIG_TOP;
However, when this is then generated as a Verilog file, the type is included which is wrong.
Anytime the component is re-imported, the type needs to be manually deleted.
I'm trying to use Kactus with a bunch of scripts/tools that we've used for a while. I encountered a problem while doing that with the XML namespace handling in Kacuts. Our tools use an XML libraries that do not explicitly place the namespace on every node (and can't be forced to do so) but use the 'xmlns' attribute to set the namespace on the root node of the file. Those files can't be worked on using Kactus because the deserialization assumes the namespace prefix 'ipxact:' to be present on all tags.
I'd be willing to provide a pull request to make the deserialization standards conformant, but wanted to ask first if such a change would be welcomed at all.
Hello!
As the title states, is there a way to configure the VHDL Generator to generate VHDL with entity instantiations (e.g. ff_inst : entity ex_lib.ff(rtl)
), instead of component instantiations (e.g. ff_inst : ff
)?
When the model is saved, it would be great if Kactus would (optionally?) sort the memoryMap before saving.
Currently the model is saved in an unsorted state. For example if Register A is at address 0, and register B is at address 1, the xml may still list register B first. I believe that the order is determined by the order that the elements are added in the GUI.
When I run kactus2 -c
I'm greeted with some statistics about the IP-XACT library.
However, if I run python directly and run e.g.
import pythonAPI
api = pythonAPI.PythonAPI()
api.vlnvExistsInLibrary(....)
I will get a segmentation fault. I guess it's because the library hasn't been initialized properly and I suspect I need to run setupLibrary somehow but haven't figured out what I need to do
Hello,
In the Other Clocks editor, all numeric values are limited in edition to 99.99.
Coupled with the fact that it is not possible to specify the timings in anything aside nanoseconds and picoseconds, it (artificially) forbid the support for clock over 100ns or below 0.01ps.
It is possible to work around that using right-click > paste but this isn't practical.
Could this limitation be lifted and other time units added (at least up to the second) within the time unit drop-down ?
For me, being able to work with at least a 999.999 time format (and more time units) would be great.
Best regards,
Julien FAUCHER
I'm working with the 3.7.0 version compiled under Ubuntu 19.04
The latest release tag is https://github.com/kactus2/kactus2dev/releases/tag/v3.8.0, and it is far behind the master branch.
This may brings problems to many Linux distributions that want to use the latest version of the package. Could an updated release tag be issued if it is convenient? Thank you!
Are there plans for adding support for the new version of IP-XACT?
If a component with a resetTypes element is loaded, all of the them are lost on save.
Hi,
I have built kactus2 on ubuntu 22.10 and everything seems clean. When I start kactus2 on the command line, I see the following:
kactus2: error while loading shared libraries: libIPXACTmodels.so.1: cannot open shared object file: No such file or directory
What am I missing exactly ?
Thx Paul.
Add feature to add tags to components for categorization:
After changing 0x0 => 'h0 (and so forth) from the IP-XACT 1685-2014 specification component example (which seems to violate the specification but would still be nice if it worked) I tried to load just part of a single memory map into cactus. What I ended up with is this:
It only shows F1 but not the other 3 bit fields (F2-F4) in the visualization. Also, with the map expanded as shown, if I resize the visualization to be wider it crashes.
Example XML: test.txt
It seems IP-XACT modules with parameter Verilog Skeleton generation is broken currently it causes the tool to crash with Segmentation Fault.
I have narrowed it down to the following commit changes:
32f2cad.
Design a plugin for generating UVM RAL files for component memory access verification.
When compile latest kactus2(git hash: a1d144e) form source on linux (latest archlinux, gentoo, debian sid), errors will occur during compilation.
cannot use executable file '/home/vowstar/Projects/2022/kactus2dev/PythonAPI/../executable/libKactus2.so' as input to a link
log:
./configure
make
...
...
rm -f libPythonAPI.so.1.0.0 libPythonAPI.so libPythonAPI.so.1 libPythonAPI.so.1.0
g++ -Wl,-O1 -shared -Wl,-soname,libPythonAPI.so.1 -o libPythonAPI.so.1.0.0 release/PythonAPI.o release/ComponentAndInstantiationsParameterFinder.o release/ComponentParameterFinder.o release/ExpressionFormatter.o release/IPXactSystemVerilogParser.o release/ListParameterFinder.o release/ParameterCache.o release/SystemVerilogExpressionParser.o release/AddressBlockExpressionsGatherer.o release/FieldExpressionsGatherer.o release/MemoryMapExpressionsGatherer.o release/MemoryRemapExpressionGatherer.o release/RegisterExpressionsGatherer.o release/RegisterFileExpressionsGatherer.o release/librarypathvalidator.o release/VersionHelper.o release/PythonAPI_wrap.o release/moc_ParameterCache.o release/moc_librarypathvalidator.o -Lx64/executable -L/home/vowstar/Projects/2022/kactus2dev/PythonAPI/../executable -lIPXACTmodels -lKactus2 /usr/lib64/libQt5Widgets.so /usr/lib64/libQt5Gui.so /usr/lib64/libQt5Xml.so /usr/lib64/libQt5Core.so -lGL -pthread
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.1/../../../../x86_64-pc-linux-gnu/bin/ld: cannot use executable file '/home/vowstar/Projects/2022/kactus2dev/PythonAPI/../executable/libKactus2.so' as input to a link
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:143: libPythonAPI.so.1.0.0] Error 1
make[1]: Leaving directory '/home/vowstar/Projects/2022/kactus2dev/PythonAPI'
make: *** [Makefile:111: sub-PythonAPI-make_first] Error 2
This may be related to issue #55
Kactus2 3.9.171 64bit Windows
I have multiple wires / ports which are similarly named except the physical port has the direction as a suffix and the case of some letters may differ. I've replaced digits in the names with a lowercase x.
Bus logical wire examples:
GPIO_DPGA_x_PULLUP
GPIO_DPGA_x_PULLDN
GPIO_SPGA_x_PULLUP
GPIO_SPGA_x_PULLDN
GPIO_BUFF_PULLUP
GPIO_BUFF_PULLDN
GPIO_BUFFx_PULLUP
GPIO_BUFFx_PULLDN
GPIO_DPGA_x_INPUT_NEG_PULLUP
GPIO_DPGA_x_INPUT_POS_PULLUP
GPIO_DPGA_x_INPUT_NEG_PULLDN
GPIO_DPGA_x_INPUT_POS_PULLDN
Component logical port examples:
gpio_DPGA_x_pulldn_out
gpio_DPGA_x_pullup_out
gpio_SPGA_x_pulldn_out
gpio_SPGA_x_pullup_out
gpio_BUFF_pulldn_out
gpio_BUFF_pullup_out
gpio_BUFFx_pulldn_out
gpio_BUFFx_pullup_out
gpio_DPGA_x_input_neg_pullup_out
gpio_DPGA_x_input_pos_pullup_out
gpio_DPGA_x_input_neg_pulldn_out
gpio_DPGA_x_input_pos_pulldn_out
The autoconnect makes the following correct connections.
GPIO_DPGA_x_PULLDN -> gpio_DPGA_x_pulldn_out
GPIO_SPGA_x_PULLDN -> gpio_SPGA_x_pulldn_out
GPIO_BUFF_PULLDN -> gpio_BUFF_pulldn_out
GPIO_BUFFx_PULLDN -> gpio_BUFFx_pulldn_out
GPIO_DPGA_x_INPUT_NEG_PULLUP -> gpio_DPGA_x_input_neg_pullup_out
GPIO_DPGA_x_INPUT_POS_PULLUP -> gpio_DPGA_x_input_pos_pullup_out
GPIO_DPGA_x_INPUT_NEG_PULLDN -> gpio_DPGA_x_input_neg_pulldn_out
GPIO_DPGA_x_INPUT_POS_PULLDN -> gpio_DPGA_x_input_pos_pulldn_out
The autoconnect makes the following incorrect connections.
GPIO_DPGA_x_PULLUP -> gpio_DPGA_x_pulldn_out
GPIO_SPGA_x_PULLUP -> gpio_SPGA_x_pulldn_out
GPIO_BUFF_PULLUP -> gpio_BUFF_pulldn_out
GPIO_BUFFx_PULLUP -> gpio_BUFFx_pulldn_out
Based on my signals, the pullup / pulldn is determined correctly on the longer names but the shorter PULLUP bus wires get assigned to the pulldn ports as well (bus wires shorted). This results in some pullup ports being unassigned to any interface which is how I discovered the problem. I then edit the XML to change "dn" to "up" in the portmaps which are broken since that's the easiest way to fix them when you have 100's of ports.
Hopefully this information will help to improve the algorithm.
If the model contanis vendor extensions which are nested hierarchically, only the top level element is saved. It looks like this is a new bug, as previous versions did not do this.
For Example if I open and save the following,
<?xml version="1.0" encoding="UTF-8"?>
<ipxact:component xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ipxact="http://www.accellera.org/XMLSchema/IPXACT/1685-2014" xmlns:kactus2="http://kactus2.cs.tut.fi" xmlns:my_vendor="http://www.my_vendor.com">
<ipxact:vendor>my_vendor</ipxact:vendor>
<ipxact:library>my_library</ipxact:library>
<ipxact:name>my_name</ipxact:name>
<ipxact:version>my_version</ipxact:version>
<ipxact:vendorExtensions>
<my_vendor:parent>
<my_vendor:child_0>Some Value</my_vendor:child_0>
<my_vendor:child_1>
<my_vendor:child_1_0>Some Value</my_vendor:child_1_0>
<my_vendor:child_1_1>Some Value</my_vendor:child_1_1>
</my_vendor:child_1>
<my_vendor:child_2>
<my_vendor:child_2_0>Some Value</my_vendor:child_2_0>
<my_vendor:child_2_1>
<my_vendor:child_2_1_0> Some Value</my_vendor:child_2_3_0>
</my_vendor:child_2_1>
</my_vendor:child_2>
</my_vendor:parent>
</ipxact:vendorExtensions>
</ipxact:component>
the saved copy will only contain
<?xml version="1.0" encoding="UTF-8"?>
<ipxact:component xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ipxact="http://www.accellera.org/XMLSchema/IPXACT/1685-2014" xmlns:kactus2="http://kactus2.cs.tut.fi" xmlns:my_vendor="http://www.my_vendor.com" xsi:schemaLocation="http://www.accellera.org/XMLSchema/IPXACT/1685-2014 http://www.accellera.org/XMLSchema/IPXACT/1685-2014/index.xsd">
<ipxact:vendor>my_vendor</ipxact:vendor>
<ipxact:library>my_library</ipxact:library>
<ipxact:name>my_name</ipxact:name>
<ipxact:version>my_version</ipxact:version>
<ipxact:vendorExtensions>
<my_vendor:parent>
<my_vendor:child_1>
<my_vendor:child_1_1/>
</my_vendor:child_1>
<my_vendor:child_2>
<my_vendor:child_2_1/>
</my_vendor:child_2>
</my_vendor:parent>
</ipxact:vendorExtensions>
</ipxact:component>
It seems to lose top level children if they only contain text.
Keep top level children if they themselve contain children.
It removes the content from gradchildren nodes, and only keeps the last element.
Log: https://github.com/kactus2/kactus2dev/runs/2672350457?check_suite_focus=true
cd Plugins/SVDGenerator/ && ( test -e Makefile || /home/runner/work/kactus2dev/Qt/5.15.2/gcc_64/bin/qmake -o Makefile /home/runner/work/kactus2dev/kactus2dev/Plugins/SVDGenerator/SVDGenerator.pro ) && make -f Makefile
Cannot find file: /home/runner/work/kactus2dev/kactus2dev/Plugins/SVDGenerator/SVDGenerator.pro.
make: *** [Makefile:561: sub-Plugins-SVDGenerator-make_first] Error 2
make: *** Waiting for unfinished jobs....
The real name in project is SVDGeneratorPlugin.pro
This may be a bug.
Kactus2 3.9.171 64bit Windows
If you export a wired port with master/slave pairs then they are not imported as a pair. One name is changed by adding a _0 suffix. Also I don't believe spaces should be allowed in the names.
It seems the latest commit: e6d55fb has completely broken the tool.
GUI keeps crashing, unable to keep the GUI open more than few seconds on Linux.
I have encountered a reproducible segmentation fault when resizing the Memory maps visualization window.
I noticed a similar issue reported in #27, but I have built from source on master and that fix is included.
Steps to reproduce:
I have pasted a stack trace below while running on macOS, but I can also reproduce on CentOS7.
The problem appears to come from handling of field gap items. There is no segfault when recompiling with the following line commented out:
I have been debugging this method:
Thus far, I have not been successful in root causing the issue, but will continue to debug. I wanted to report this in the meantime in case someone had suggestions.
Stack trace:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 org.qt-project.QtCore 0x000000010bc3fdd3 QMapNodeBase::nextNode() const + 19
1 com.yourcompany.kactus2 0x000000010a2bf242 MemoryVisualizationItem::setWidth(double) + 194
2 com.yourcompany.kactus2 0x000000010a2bf23a MemoryVisualizationItem::setWidth(double) + 186
3 com.yourcompany.kactus2 0x000000010a25cad4 MemoryMapScene::setWidth(int) + 356
4 com.yourcompany.kactus2 0x000000010a25dcfe MemoryMapView::resizeEvent(QResizeEvent*) + 78
5 org.qt-project.QtWidgets 0x000000010afe387c QWidget::event(QEvent*) + 1132
6 org.qt-project.QtWidgets 0x000000010b08a9bb QFrame::event(QEvent*) + 43
7 org.qt-project.QtWidgets 0x000000010b306141 QGraphicsView::viewportEvent(QEvent*) + 1185
8 org.qt-project.QtCore 0x000000010bdce0a8 QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) + 248
9 org.qt-project.QtWidgets 0x000000010afa9cd1 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 241
10 org.qt-project.QtWidgets 0x000000010afab125 QApplication::notify(QObject*, QEvent*) + 581
11 org.qt-project.QtCore 0x000000010bdcdde4 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 212
12 org.qt-project.QtWidgets 0x000000010afe0a2b QWidgetPrivate::setGeometry_sys(int, int, int, int, bool) + 1931
13 org.qt-project.QtWidgets 0x000000010afe0cb0 QWidget::setGeometry(QRect const&) + 272
14 org.qt-project.QtWidgets 0x000000010b08c6d6 QAbstractScrollAreaPrivate::layoutChildren_helper(bool*, bool*) + 2454
15 org.qt-project.QtWidgets 0x000000010b08d748 QAbstractScrollArea::event(QEvent*) + 344
16 org.qt-project.QtWidgets 0x000000010afa9ce6 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 262
17 org.qt-project.QtWidgets 0x000000010afab125 QApplication::notify(QObject*, QEvent*) + 581
18 org.qt-project.QtCore 0x000000010bdcdde4 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 212
19 org.qt-project.QtWidgets 0x000000010afe0a2b QWidgetPrivate::setGeometry_sys(int, int, int, int, bool) + 1931
20 org.qt-project.QtWidgets 0x000000010afe0cb0 QWidget::setGeometry(QRect const&) + 272
21 org.qt-project.QtWidgets 0x000000010afca0ce QWidgetItem::setGeometry(QRect const&) + 718
22 org.qt-project.QtWidgets 0x000000010afbd22b QBoxLayout::setGeometry(QRect const&) + 1195
23 org.qt-project.QtWidgets 0x000000010afc6b31 QLayoutPrivate::doResize() + 145
24 org.qt-project.QtWidgets 0x000000010afa9cc6 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 230
25 org.qt-project.QtWidgets 0x000000010afab125 QApplication::notify(QObject*, QEvent*) + 581
26 org.qt-project.QtCore 0x000000010bdcdde4 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 212
27 org.qt-project.QtWidgets 0x000000010afe0a2b QWidgetPrivate::setGeometry_sys(int, int, int, int, bool) + 1931
28 org.qt-project.QtWidgets 0x000000010afe0cb0 QWidget::setGeometry(QRect const&) + 272
29 org.qt-project.QtWidgets 0x000000010afca0ce QWidgetItem::setGeometry(QRect const&) + 718
30 org.qt-project.QtWidgets 0x000000010afbd22b QBoxLayout::setGeometry(QRect const&) + 1195
31 org.qt-project.QtWidgets 0x000000010afc6b31 QLayoutPrivate::doResize() + 145
32 org.qt-project.QtWidgets 0x000000010afa9cc6 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 230
33 org.qt-project.QtWidgets 0x000000010afab125 QApplication::notify(QObject*, QEvent*) + 581
34 org.qt-project.QtCore 0x000000010bdcdde4 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 212
35 org.qt-project.QtWidgets 0x000000010afe0a2b QWidgetPrivate::setGeometry_sys(int, int, int, int, bool) + 1931
36 org.qt-project.QtWidgets 0x000000010afe0cb0 QWidget::setGeometry(QRect const&) + 272
37 org.qt-project.QtWidgets 0x000000010b1523a6 0x10af99000 + 1807270
38 org.qt-project.QtWidgets 0x000000010b15062c QSplitter::moveSplitter(int, int) + 764
39 org.qt-project.QtWidgets 0x000000010b150dd1 QSplitterHandle::mouseMoveEvent(QMouseEvent*) + 273
40 org.qt-project.QtWidgets 0x000000010afe35f4 QWidget::event(QEvent*) + 484
41 org.qt-project.QtWidgets 0x000000010afa9ce6 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 262
42 org.qt-project.QtWidgets 0x000000010afacce8 QApplication::notify(QObject*, QEvent*) + 7688
43 org.qt-project.QtCore 0x000000010bdcdde4 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 212
44 org.qt-project.QtWidgets 0x000000010afaa607 QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) + 903
45 org.qt-project.QtWidgets 0x000000010b0026be 0x10af99000 + 431806
46 org.qt-project.QtWidgets 0x000000010b000e3a 0x10af99000 + 425530
47 org.qt-project.QtWidgets 0x000000010afa9ce6 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 262
48 org.qt-project.QtWidgets 0x000000010afab125 QApplication::notify(QObject*, QEvent*) + 581
49 org.qt-project.QtCore 0x000000010bdcdde4 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 212
50 org.qt-project.QtGui 0x000000010b585bc9 QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) + 3353
51 org.qt-project.QtGui 0x000000010b56ad6b QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 235
52 libqcocoa.dylib 0x000000010c470fa8 0x10c437000 + 237480
53 com.apple.CoreFoundation 0x00007fff2051aa0c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
54 com.apple.CoreFoundation 0x00007fff2051a974 __CFRunLoopDoSource0 + 180
55 com.apple.CoreFoundation 0x00007fff2051a6ef __CFRunLoopDoSources0 + 248
56 com.apple.CoreFoundation 0x00007fff20519121 __CFRunLoopRun + 890
57 com.apple.CoreFoundation 0x00007fff205186ce CFRunLoopRunSpecific + 563
58 com.apple.HIToolbox 0x00007fff287a0630 RunCurrentEventLoopInMode + 292
59 com.apple.HIToolbox 0x00007fff287a0282 ReceiveNextEventCommon + 283
60 com.apple.HIToolbox 0x00007fff287a014f _BlockUntilNextEventMatchingListInModeWithFilter + 64
61 com.apple.AppKit 0x00007fff22d389b1 _DPSNextEvent + 883
62 com.apple.AppKit 0x00007fff22d37177 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1366
63 com.apple.AppKit 0x00007fff22d2968a -[NSApplication run] + 586
64 libqcocoa.dylib 0x000000010c46fd34 0x10c437000 + 232756
65 org.qt-project.QtCore 0x000000010bdc9fb7 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 439
66 org.qt-project.QtCore 0x000000010bdce372 QCoreApplication::exec() + 130
67 com.yourcompany.kactus2 0x000000010a02d008 main + 1272
68 libdyld.dylib 0x00007fff2043d621 start + 1
Thread 1:: com.apple.NSEventThread
0 libsystem_kernel.dylib 0x00007fff203ede7e mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff203ee1f0 mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff2051abf7 __CFRunLoopServiceMachPort + 316
3 com.apple.CoreFoundation 0x00007fff205192ca __CFRunLoopRun + 1315
4 com.apple.CoreFoundation 0x00007fff205186ce CFRunLoopRunSpecific + 563
5 com.apple.AppKit 0x00007fff22ebe7c6 _NSEventThread + 124
6 libsystem_pthread.dylib 0x00007fff20422950 _pthread_start + 224
7 libsystem_pthread.dylib 0x00007fff2041e47b thread_start + 15
Thread 2:
0 libsystem_pthread.dylib 0x00007fff2041e458 start_wqthread + 0
Thread 3:
0 libsystem_pthread.dylib 0x00007fff2041e458 start_wqthread + 0
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x9d2d3e5000007f9f rbx: 0x00007f9f9b6e3d40 rcx: 0x9d2d3e5000007f9f rdx: 0x00007ffee5c48cc8
rdi: 0x00007f9f9b6e3d40 rsi: 0x00007ffee5c48cc8 rbp: 0x00007ffee5c48e30 rsp: 0x00007ffee5c48e30
r8: 0x00000000000053d4 r9: 0x0000000000000001 r10: 0x00007f9f9c200000 r11: 0x00007f9f9c2e0b00
r12: 0x00007f9f9d2793f0 r13: 0x00007f9f9d2da3d0 r14: 0x00007f9f9d2d3ef0 r15: 0x00007f9f9b66e4f8
rip: 0x000000010bc3fdd3 rfl: 0x0000000000010286 cr2: 0x0000000103fad000
Kactus2 3.9.171 64bit Windows
I've created a bus definition and defined a few wired ports.
I then have a component which maps them on a bus interface.
If I then delete a bus wired port (in this case port_1) and go back to the component, selecting the portmap, the table is now broken with an empty line.
Changing the sort order will even mess with the headings.
An attempt to save the component results in the following error.
The document contained the following error(s):
- Could not locate logical port port_1 mapped within master bus interface bus_interface
The only way to fix the component is to go into the xml file and delete the portmap for port_1. Once this is done, the bus interface is restored without errors.
Verilog generation uses default values instead of expressions/parameter name in component instantiation.
It also generate sub-components with immediate values instead of "parameterizing" them. (that is probably a consequence of the previous issue).
Finally, but this might be worth a separated issue, the verilog generator and the memory designer do not pick the sub-component parameters.
These issues can be experienced with the ipxactexamplelib.
The VHDL generator seems to be using properly the expressions in the genericmap.
Kactus2 3.9.171 64 Bit for Windows
If I export the the ports as a csv file and them import it again, the Ad-hoc is always set to true. I tried editing the file to use 0 and 1 and it still imports as true.
As soon as block addresses above 0x80000000 are used, errors occures.
Example Address Block table:
Name/Base/Range/Width
MODUL_A 'h40000000 4 32
MODUL_B 'h80000000 4 32
The XML file is not influenced. the addresses are written correctly.
Tested with 3.6 and 3.8
I have just built current master on arch and installed. I have realized that in .desktop file, that is copied to /usr/share/applications/kactus2.desktop
, there is a minor error.
Namely:
TryExec=Kactus2
Exec=Kactus2
Lower case 'k' should be used.
EDIT
I have prepared pull request.
Kactus2 3.9.171 64bit Windows
I have a file which misses the last port line but not in all cases.
Screen capture from Kactus2 import window.
I have narrowed the code down to the following
library IEEE;
use IEEE.STD_LOGIC_1164.all;
use IEEE.STD_LOGIC_arith.all;
use IEEE.STD_LOGIC_unsigned.all;
entity DIG_TOP is
port (
-- cfg_comp_12_analog_hyst_pos_in : in std_logic_vector(8-1 downto 0);
-- cfg_comp_12_analog_hyst_neg_in : in std_logic_vector(8-1 downto 0);
-- cfg_comp_13_analog_hyst_neg_in : in std_logic_vector(8-1 downto 0);
-- cfg_comp_14_analog_hyst_pos_in : in std_logic_vector(8-1 downto 0);
-- cfg_comp_14_analog_hyst_neg_in : in std_logic_vector(8-1 downto 0);
-- cfg_comp_15_analog_hyst_pos_in : in std_logic_vector(8-1 downto 0);
-- cfg_comp_15_analog_hyst_neg_in : in std_logic_vector(8-1 downto 0);
-- cfg_comp_16_analog_hyst_pos_in : in std_logic_vector(8-1 downto 0);
-- clk, rstb
clk_in : in std_logic;
rstb_in : in std_logic
);
end DIG_TOP;
If I remove any of the comment lines right after port( then the import works. There were additional comment lines that looked identical but it came down to just having these. I've tried taking the code from this issue to reproduce the problem and it does for me. Hopefully it is reproduced for you. Truly a bizarre bug.
Tony
I did the build on Ubuntu 20.04 in WSL2. After the above fixes I could start it in WSL2.
I tried moving 2 bigger instances in the HW-Desigin and Kactus2 crashed every time, so I tried some combinations and it turns out moving an instance with 15 or more Ad-hoc ports makes Kactus2 crash on my system.
I am using a Windows PC and did not have any other issues with the software crashing or misbehaving.
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.