You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-2Lines changed: 39 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
# VhdlTestScript
2
2
3
-
This is DSL with Ruby to create VHDL test bench easily and test runner. (This Project is forked from [tomykaira/vhdl_doctest](https://github.com/tomykaira/vhdl_doctest))
3
+
VhdlTestScript is a test-driven development Tool for VHDL
4
+
(This Project is forked from [tomykaira/vhdl_doctest](https://github.com/tomykaira/vhdl_doctest))
4
5
5
6
## Dependency
6
7
@@ -14,9 +15,45 @@ This uses GHDL for compiling and running VHDL. Please download from [GHDL Main/
14
15
15
16
Install GHDL from [GHDL Main/Home Page](http://ghdl.free.fr).
16
17
18
+
## Usage
19
+
20
+
To use VhdlTestScript, you write test benches with ruby like this.
21
+
22
+
```ruby
23
+
VhdlTestScript.scenario DUT_PATHdo |dut|
24
+
# please write your test scenario here
25
+
26
+
# Example:
27
+
# 'a' is 'in' port , 'output' is 'out' port.
28
+
# declare port to use test as ':a' or 'dut.a'
29
+
ports :a, :output
30
+
31
+
# to use 'in' port 'clk' as clock.
32
+
clock :clk
33
+
34
+
# when 'a' is assigned '1' before rising edge,
35
+
# 'output' is expected to be '1' after clock.
36
+
step 1, 1
37
+
38
+
step 2, 2
39
+
40
+
# '_' means 'don't assign' or 'don't care'.
41
+
step _, 2
42
+
step 1, _
43
+
44
+
# you can use 'step' like this
45
+
step a:1, output:1
46
+
end
47
+
```
48
+
49
+
this ruby test bench is converted into a VHDL test bench when run vhdltestscript
50
+
51
+
Documentation of test scenario syntax is being developed now.
52
+
Please read example codes in /example to know how to write test scenario.
53
+
17
54
## Issues And Features
18
55
19
-
If you found a bug (or unexpected movement), let me know. Please attach your vhd file (as far as possible), and describe your intention precisely.
56
+
If you found a bug (or unexpected movement), let me know. Please attach your vhd and test bench file (as far as possible), and describe your intention precisely.
20
57
21
58
Any feature request is welcome. I appreciate if it have an example, or a test case.
0 commit comments