Comments (8)
I updated the hardwaredescriptions page with the steps to build uart programs that I have used for testing the hardware. readme file also has a link to it. I also added the unit test framework on the projects page as that it something that needs to be built sooner or later.
from ac_inout_psu.
Great news that someone else has managed to build it!
I have an intention to create a set of test benches to have unit tests for the code and have them run with the ghdl script found in the project root for continuous integration style workflow. So far I haven't gotten around to write simulations for the fifo, ram and ddr io that are implemented with quartus IP cores thus there aren't working simulations for most of the features right now unfortunately.
The testbench for the hw multiplier works though
from ac_inout_psu.
from ac_inout_psu.
Vunit also has a github actions availabe https://github.com/VUnit/vunit_action which I will (probably) be using eventually.
The way I've envisioned the tests to work is that running the test benches should be part of normal code development flow. If running the GHDL simulations takes only seconds, there should be a script that builds the module header packages for syntax checking as well as runs all of the basic functional simulations. Even if most of the tests do nothing more than just basic simulation that requires the developer to look at the waveform, running the tests pretty much continuously prevents the situation where the code breaks and need to be maintained after large changes in the code base.
The tests should be done using the objects instead of the application code, which mostly uses many different modules. For this reason the code should be written by wrapping the different functional units to own code objects that can be simulated separately. For example the test for ethernet frame transmitter is
frame_transmitter_starter : process(simulator_clock)
begin
if rising_edge(simulator_clock) then
if clocked_reset = '0' then
simulator_counter <= 0;
else
simulator_counter <= simulator_counter + 1;
create_transmit_controller(frame_transmit_controller);
if simulator_counter = 10 then
transmit_ethernet_frame(frame_transmit_controller, 27);
end if;
end if; -- rstn
end if; --rising_edge
end process frame_transmitter_starter;
Although it no longer works since the fifo and ram modules were added to the frame_transmit_controller, the code was initially developed using this testbench. Testing a lot of small things separately is more valuable than larger modules since the entire system is testable in a few minutes by compiling the code to the hardware.
For testing purpose the codebase is still lacking models for RAM and FIFO module simulation architectures that are needed for the ethernet communication to be testable so those would be very useful.
from ac_inout_psu.
I do agree with you about testing small and testing often. That's what VUnit is all about.
"running the test benches should be part of normal code development flow" : perfect! Someone says test should be built PRIOR to code development, but those are extremists (TDD)!
I have done a pull request with my feature/vunit branch #32
"Testing a lot of small things separately is more valuable than larger modules since the entire system is testable in a few minutes by compiling the code to the hardware." : right, in case the design is small enough to compile fast to hardware.
from ac_inout_psu.
Maybe this https://vhdlwhiz.com/link-quartus-ip-libraries-to-vunit/ could help for integrating RAM/FIFO IP into the simulation scripts
from ac_inout_psu.
Where is the unit test framework on the projects page?
from ac_inout_psu.
It was called scripts for calling test benches so i renamed it unit test framework scripts for testbenches
from ac_inout_psu.
Related Issues (14)
- Now it starts HOT 1
- Read spi adc measurement
- Ethernet frame transmitter HOT 1
- bug: fix ads7056 io read timing
- bug: spi adc probably boots to sleep mode in some cases
- mdio control
- sequential_multiply is not working as intended HOT 1
- sim_miltiplier.bat not working? HOT 7
- add trigger mechanism for create_state_variable for state calculation to be callable directly HOT 1
- division does not work for negative number or for numbers larger than 32767
- :sparkles: **uart** :sparkles: HOT 1
- Ethernet frame receiver HOT 1
- Fixed point math library
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ac_inout_psu.