Skip to content

Commit 4aa5adf

Browse files
committed
Update documents
1 parent 02d7c0a commit 4aa5adf

File tree

2 files changed

+41
-4
lines changed

2 files changed

+41
-4
lines changed

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2012 tomykaira
1+
Copyright (c) 2013 Tomoya Chiba, tomykaira
22

33
MIT License
44

@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1919
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
2020
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
2121
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# VhdlTestScript
22

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))
45

56
## Dependency
67

@@ -14,9 +15,45 @@ This uses GHDL for compiling and running VHDL. Please download from [GHDL Main/
1415

1516
Install GHDL from [GHDL Main/Home Page](http://ghdl.free.fr).
1617

18+
## Usage
19+
20+
To use VhdlTestScript, you write test benches with ruby like this.
21+
22+
```ruby
23+
VhdlTestScript.scenario DUT_PATH do |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+
1754
## Issues And Features
1855

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.
2057

2158
Any feature request is welcome. I appreciate if it have an example, or a test case.
2259

0 commit comments

Comments
 (0)