Author Topic: Help with calling (external) C code from testbench  (Read 1206 times)

0 Members and 1 Guest are viewing this topic.

Offline mostly_competentTopic starter

  • Newbie
  • Posts: 2
  • Country: 00
Help with calling (external) C code from testbench
« on: June 10, 2017, 04:24:25 pm »
Greetings everybody!

For my current project, I am interfacing a custom module with a video generator, via a dual-port RAM connected to both modules. Since I am done with verifying the design, both in simulation and in synthesis, I am now left with the task of coding the system firmware. Since resynthesizing and reprogramming every time I make changes in the firmware is too much of a hassle, and is most probably going to consume time that could be used to further improve the firmware, I am now looking into interfacing my existing testbanch to some external C code, which will read the video RAM module and render video in a window using something like SDL or Allegro.

I know about verilator, but it requires significant adaptation of the source code, and, as far as I know, it does not support unsynthesizable timing-related constructs, which could be useful in a test environment. So, is there any viable way to achieve this task?

Any pointers are appreciated.
 

Offline pthor

  • Newbie
  • Posts: 9
  • Country: no
Re: Help with calling (external) C code from testbench
« Reply #1 on: June 11, 2017, 01:28:22 am »
Are you essentially looking for a way to efficiently develop and test the firmware? This is software running on a processor/MCU, which is connected to your custom module(?) and/or RAM?

If so, consider separating the development+testing of the firmware from the testing of the hardware.
You already have a verified HW design and interface? Mock that interface and behaviour with software unit tests that you use to stimulate and drive the design of the firmware? Combine with HW/SW integration tests. Check out James Grennings book on test driven development in embedded C.

Might be that I totally misunderstood you, but I could not really connect your different statements of developing firmware plus the need to connect external (others?) C code with a (HW) testbench?
Or are you just trying to read out the content of the RAM + to visialize and evaluate the video data from the custom hardware module?
« Last Edit: June 11, 2017, 01:31:14 am by pthor »
 

Offline mostly_competentTopic starter

  • Newbie
  • Posts: 2
  • Country: 00
Re: Help with calling (external) C code from testbench
« Reply #2 on: June 11, 2017, 07:23:01 am »
Or are you just trying to read out the content of the RAM + to visialize and evaluate the video data from the custom hardware module?

That's exactly what I would like to do: Read the video RAM and visualize its contents in a pixel canvas window, in order to be able to see what the firmware is going
to display on screen.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf