User Tools

Site Tools


migen:migen_seven

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
migen:migen_seven [2018/01/10 18:05]
po
migen:migen_seven [2018/01/10 18:42] (current)
po
Line 1: Line 1:
 ====== Testbench Example ====== ====== Testbench Example ======
 +
 ===== Seven Segment Display ===== ===== Seven Segment Display =====
  
 In this part, we are going to see another interesting feature of Migen, which consist of developing advanced testbench in python. In this part, we are going to see another interesting feature of Migen, which consist of developing advanced testbench in python.
 The example we are taking here is the one of a simple seven segment controller. The example we are taking here is the one of a simple seven segment controller.
 +
 {{ migen:​afficheur-double.png?​400 |}} {{ migen:​afficheur-double.png?​400 |}}
 +
 As its name stipulate, a seven segment display is made of 7 segments/​led which are denoted ABCDEFG (we don't considerate the dot here). As its name stipulate, a seven segment display is made of 7 segments/​led which are denoted ABCDEFG (we don't considerate the dot here).
-If we wanted to control such a display, we would need then either 7 Signals() in migen, or a single one with 7 bits. This is what we will be doing. considering that the LSB is the "​A"​ and the MSB is the "​G"​ +If we wanted to control such a display, we would need then either 7 Signals() in migen, or a single one with 7 bits. This is what we will be doing. considering that the LSB is the "​A"​ and the MSB is the "​G"​
-{{ migen:​7seg.jpg?​400 |}}  + 
 +{{ migen:​7seg.jpg?​400 |}} 
 By combining the led of the display, one can display all the hexadecimal values. By combining the led of the display, one can display all the hexadecimal values.
  
Line 121: Line 126:
 </​file>​ </​file>​
 As we can see in sevseg_tb, we set the 16 values to dut.hexa. and run a cycle with "​yield",​ then get the value in "​abcdefg"​ of our module, and send it to our display function previously written. We will see that our core works and have a display, rather than just use a waveform and deduce. That makes us save a lot of precious time. As we can see in sevseg_tb, we set the 16 values to dut.hexa. and run a cycle with "​yield",​ then get the value in "​abcdefg"​ of our module, and send it to our display function previously written. We will see that our core works and have a display, rather than just use a waveform and deduce. That makes us save a lot of precious time.
- 
- 
migen/migen_seven.txt · Last modified: 2018/01/10 18:42 by po