HDLRuby 3.3.0 → 3.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -7,9 +7,13 @@ __Note__:
7
7
 
8
8
  If you are new to HDLRuby, it is recommended that you consult first the following tutorial (even if you are a hardware person):
9
9
 
10
- * [HDLRuby tutorial for software people](tuto/tutorial_sw.md) [md]
10
+ * [HDLRuby tutorial for software people](https://github.com/civol/HDLRuby/blob/master/tuto/tutorial_sw.md) [md]
11
11
 
12
- * [HDLRuby tutorial for software people](tuto/tutorial_sw.html) [html]
12
+ And if you want an html version the following command with create a `tuto` folder containing all the required files, then just open `tuto/tutorial_sw.html`:
13
+
14
+ ```
15
+ hdrcc --get-tuto
16
+ ```
13
17
 
14
18
  __What's new__
15
19
 
@@ -70,7 +74,7 @@ gem install HDLRuby
70
74
  Developers willing to contribute to HDLRuby can install the sources from GitHub as follows:
71
75
 
72
76
  ```
73
- git clone HDLRuby
77
+ git clone https://github.com/civol/HDLRuby.git
74
78
  ```
75
79
 
76
80
  __Warning__:
@@ -0,0 +1,32 @@
1
+
2
+ # A benchmark for testing the use of a board model implementing:
3
+ # * a simple NAND whose input are set using slide switches, and
4
+ # whose output bits are showns on LEDs and an oscilloscope.
5
+ system :nand_board do
6
+ [8].input :din0, :din1
7
+ [8].output :dout
8
+
9
+ dout <= ~(din0 & din1)
10
+
11
+ inner :clk
12
+ # Description of the board.
13
+ # It is updated at each rising edge of +clk2+.
14
+ board(:nand,8080) do
15
+ actport clk.posedge
16
+ sw din0: din0
17
+ sw din1: din1
18
+ row
19
+ led dout: dout
20
+ row
21
+ scope doutS: dout
22
+ end
23
+
24
+ timed do
25
+ clk <= 0
26
+ !10.ns
27
+ repeat(2000) do
28
+ clk <= ~clk
29
+ !10.ns
30
+ end
31
+ end
32
+ end
data/lib/HDLRuby/hdrcc.rb CHANGED
@@ -500,7 +500,7 @@ $optparse = OptionParser.new do |opts|
500
500
  exit
501
501
  end
502
502
  opts.on("--get-tuto", "Copy the tutorial directory (tuto) to current one, then exit") do
503
- FileUtils.copy_entry(File.dirname(__FILE__) + "../../tuto","./tuto")
503
+ FileUtils.copy_entry(File.dirname(__FILE__) + "/../../tuto","./tuto")
504
504
  exit
505
505
  end
506
506
  opts.on("--version", "Show the version of HDLRuby, then exit") do |v|
@@ -2523,15 +2523,15 @@ module HDLRuby::High
2523
2523
  # Converts the if to HDLRuby::Low.
2524
2524
  def to_low
2525
2525
  # Create the resulting program.
2526
- progL = HDLRuby::Low::Program.new(self.lang,self.function)
2526
+ progL = HDLRuby::Low::Program.new(self.language,self.function)
2527
2527
  # Add the wakening events.
2528
- self.each_event { |ev| progL.add_event(ev.to_low) }
2528
+ self.each_actport { |ev| progL.add_actport(ev.to_low) }
2529
2529
  # Add the code files.
2530
2530
  self.each_code { |ev| progL.add_code(code) }
2531
2531
  # Add the input signals references.
2532
- self.each_input { |ref| progL.add_input(ref.to_low) }
2532
+ self.each_inport { |p| progL.add_inport(p[0],p[1].to_low) }
2533
2533
  # Add the output signals references.
2534
- self.each_output { |ref| progL.add_output(ref.to_low) }
2534
+ self.each_outport { |p| progL.add_outport(p[0],p[1].to_low) }
2535
2535
  # Return the resulting program.
2536
2536
  return progL
2537
2537
  end
@@ -1,3 +1,3 @@
1
1
  module HDLRuby
2
- VERSION = "3.3.0"
2
+ VERSION = "3.3.2"
3
3
  end