I have xilinx macros for uart (.edn files) and i don't know how to use the in activehdl
when i simulate the macros the give uninitialized output ? so what if any one can help me with the right way to use the macro ...?
Use the Xilinx uniMacro library. You may need to compile or download it for your simulator.
ActiveHDL is a simulator package. It typically operates by compile VHDL or Verilog code. The "macros" you are refering to with the extension ".edn" are EDIF netlist files. These are not files that can typically be used by simulator, but are in almost all cases only usable by the synthesizer for the exact device they are targeting.
It may be the case that ActelHDL can import EDIF files. In this case, it still will only work if the primitives used by the EDIF file are also added as part of the project. As another answer said, this most likely would be primitives from the Xilinx unisim library.
The best option is to probably run the EDIF files you have through the Xilinx tools (specifically "Translate" (ngdbuild) and "Generate Simulation Netlist" (netgen)) to generate a simulation model for these pieces. The result will likely require the Xilinx unisim and simprims libraries, which are usually available precompiled for most simulators, but can also easily just be pointed to the source in the Xilinx ISE install.
Related
So i'm making a program which requires std::variant, so obviously i need C++17 but that's not in Arduino without compiler flags, it's just I cant figure out what flags to do and how to change the compiler flags. (BTW i'm using windows, not Linux (though i do have a Linux laptop))
I have tried using the Arduino boost library but it seems to be written for C++ not Arduino even though it says it's made for Arduino,
I have also tried workarounds but they use up too much memory.
I want it to have std or out least an std::variant equivalent in Arduino but I haven't found a way to get that.
Thanks in advance!
EDIT: If there isn't a way to do C++17 in Arduino, then can someone link a tutorial to code Arduino boards using C++
To use boost.variant check https://github.com/vancegroup/arduino-boost
iostream, sstream, string, variant and other header files like them are not available in avr-libc and in Arduino that uses avr-g++ (and avr-libc)
You can check https://github.com/maniacbug/StandardCplusplus AND https://github.com/mike-matera/ArduinoSTL
For allocating values without known datatypes you can write your class and view https://github.com/radinParsaei/Value
The Arduino programming language is a subset of C++ with a few minor variations.
You can reference .CPP and .H files in your project, as long as they don't use C++ features that aren't supported by Arduino.
I'm sure someone will eventually get creative and find a way to compile code with the C++17 features into AVR machine code (if they haven't already).
But keep in mind, these are tiny chips often running at 10-20 MHz with around 2 KB of working memory. The standard template library was a great leap forward for C++ but it might not be the best choice when every byte counts.
I need a list of device-specific primitives of Xilinx devices. I know that ISE has a list of templates and there are also PDF user guides but I need them as list of files in a folder so that I can parse them and extract name and port-list of every module.
Any help will be appreciated.
If you are using Xilinx ISE take a look at the folder "C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\unisims\primitive" (default install location, version may vary).
In this folder you will find VHDL files for all Xilinx primitives, not sorted by device however.
Look for the file named unisim_VCOMP.vhd. It has all the component declarations of the Xilinx primitives.
For ISE, this is located at
[install dir]\[version]\ISE_DS\ISE\vhdl\src\unisims
For Vivado,
[install dir]\[version]\data\vhdl\src\unisims
Note, for Vivado, if you have VHDL that has primitives from older devices, then use unisim_retarget_VCOMP.vhd, which retargets old primitives to 7 Series and Ultrascale equivalents. However, there are some cases when retargeting certain primitives is not possible.
If your code is for 7 Series and Ultrascale families, I wouldn't worry about the "retarget" file.
I have almost found what I wanted. Language templates are stored in location:
[install dir][version]\ISE_DS\ISE\data\projnav\templates
I tried Vivado and Quartus, but both of them are quite heavy, and the tools are very complicated for a starter. Is there a lightweight free IDE + Simulator for a starter who is learning VHDL?
VHDL-Simulation:
There are ports of the linux programs GHDL and GTKwave for windows:
https://github.com/ghdl/ghdl/releases
http://gtkwave.sourceforge.net/
http://gtkwave.sourceforge.net/gtkwave.pdf
GHDL is a command line tool to compile VHDL files and "simulate" them. the output is a waveform file, which can be viewed/inspected by gtkwave. You can write some scripts (I would advice PowerShell) to automate the compilation or you can use a build tool.
In my opinion (Quartus) ModelSim / QuestaSim is not lightweight. The Xilinx simulators iSim (included in ISE) and xSim (included in Vivado) are good enough for every day simulations. ghdl is very fast, but does not support all (advanced) VHDL features.
VHDL-IDEs:
If you are familiar with state-of-the art coding environments like Visual Studio, SharDevelop, MonoDevelop, Eclipse or NetBeans then I would say coding HDLs is still in the stone-age !!
All big vendors offer free HDL toolchains, which are paided by the devices, but these tools are only multi-tabbed text editors with a design hierarchy viewer and some buttons to hide the command line tool executions.
The mentioned Sigasi Eclipse plugin (there is also e free version) is new on the market and has some advantages. This plugin is under constant development and still increasing in its features. I tested several versions in the past, but I'm not satisfied with some features so I'm still using ISE :)
As a students I have not the chance to try some professional tools from Aldec, Mentor, ...
For simulation, ModelSim-Altera Starter Edition is a free version of ModelSim provided by Altera, and is very user friendly and widely used. It has a build in editor with VHDL color coding, so you can do editing, compile, and simulation from within ModelSim.
Vivado (Xilinx) and Quartus (Altera) are synthesis tools, which can transform your VHDL design files into a hardware representation that can be downloaded into an FPGA. These synthesis tools are used for step two, after a design has been created and simulated to verify proper operation.
If you are a student, you can get a free student license for Sigasi. It's an eclipse based vhdl IDE, with all the modern IDE features like on the fly error checking, formatting, hovers...
It has integration with Modelsim, ISim and riviera, Sigasi compiles the the vhdl files for you in the background and you can start the simulator with 1 click. It's not the 100% IDE experience but it's as close as you can get for VHDL.
VHDL is complicated and not lightweight. Live with it.
For a list of free simulators, see: http://www.sigasi.com/faq/which-free-vhdl-simulator-can-i-use
I'm using VHDL on Xilinx ISE to generate a schematic of the register transfer logic in my project. I know ISE does a number of optimizations and gate reductions before spitting out the RTL and Technology schematics. What I want to do is to export the netlist of these schematics into some file so I can use that for my own program. Is there any way to do this? I keep reading about ngc files, but the contents of the ngc file generated upon synthesis make absolutely no sense.
Please let me know if you've done this before, I'd love to see how this is done. If it's not doable on ISE, can you recommend a tool that could do it?
EDIF is an industry standard format for describing netlists - there are numerous tools for interpreting them and you could easily roll your own since it's a documented textual format.
You can convert an .ngc into an edif file by running the Xilinx tool ngc2edif included in the ISE suite.
Is there any quite good tool to generate State Machine graph from VHDL code? I'm using Xilinx ISE Webpack. Cheers!
Active HDL has a feature called "Code2Graphics" which supports this.
Additionally, some synthesis tools (typically ones you would have to pay for) also support this.
Note that an RTL view is more commonly available in synthesis tools (such as XST).
Modelsim SE (and DE?) have these kind of things. But, not for free :-(