HDLRuby 3.6.1 → 3.7.0

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.
@@ -1,4 +1,5 @@
1
1
  require 'socket'
2
+ require 'io/console'
2
3
 
3
4
  require 'rubyHDL'
4
5
 
@@ -994,6 +995,31 @@ HTMLRESPONSE
994
995
  @@http_ports << @http_port
995
996
  # Create the server
996
997
  @server = TCPServer.new(@http_port)
998
+
999
+ browse = Thread.new do
1000
+ url = "http://localhost:#{@http_port}"
1001
+ # Shall we try to open a page automatically:
1002
+ puts "Shall I open a new page on your browser for the GUI? [y/n]"
1003
+ ch = ""
1004
+ ch = STDIN.getch while !(ch =~ /[YyNn]/)
1005
+ unless ch =~ /[Yy]/ then
1006
+ puts "Please open the following url manually: #{url}"
1007
+ browse.kill
1008
+ end
1009
+ # Open the page if possible.
1010
+ sleep(0.2)
1011
+ case RUBY_PLATFORM
1012
+ when /darwin/
1013
+ Kernel.system("open",url)
1014
+ when /linux/
1015
+ Kernel.system("xdg",url)
1016
+ when /mingw|mswin/
1017
+ Kernel.system("start",url)
1018
+ else
1019
+ puts "Please open the following url on your browser: #{url}"
1020
+ end
1021
+ end
1022
+
997
1023
  # Create the running function.
998
1024
  this = self
999
1025
  Kernel.define_method(@name.to_sym) { this.run }
@@ -1269,7 +1295,7 @@ HTMLRESPONSE
1269
1295
 
1270
1296
  # Start the ui.
1271
1297
  def run
1272
- # At first the u is not running.
1298
+ # At first the ui is not running.
1273
1299
  @connected = false
1274
1300
  # Create the ui thread.
1275
1301
  @thread = Thread.new do
@@ -1295,6 +1321,7 @@ HTMLRESPONSE
1295
1321
  # Wait for a first connection.
1296
1322
  sleep(0.1) while(!@connected)
1297
1323
  end
1324
+
1298
1325
  end
1299
1326
 
1300
1327
 
@@ -1,3 +1,3 @@
1
1
  module HDLRuby
2
- VERSION = "3.6.1"
2
+ VERSION = "3.7.0"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: HDLRuby
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.1
4
+ version: 3.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lovic Gauthier
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-01-09 00:00:00.000000000 Z
10
+ date: 2025-03-07 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: bundler
@@ -179,6 +179,8 @@ files:
179
179
  - lib/HDLRuby/hdr_samples/ruby_program/sw_cpu_terminal.rb
180
180
  - lib/HDLRuby/hdr_samples/ruby_program/sw_inc_mem.rb
181
181
  - lib/HDLRuby/hdr_samples/ruby_program/sw_log.rb
182
+ - lib/HDLRuby/hdr_samples/ruby_program/with_sw_hruby.rb
183
+ - lib/HDLRuby/hdr_samples/ruby_program/with_sw_hruby_hruby_test.rb
182
184
  - lib/HDLRuby/hdr_samples/seqpar_bench.rb
183
185
  - lib/HDLRuby/hdr_samples/simple_counter_bench.rb
184
186
  - lib/HDLRuby/hdr_samples/struct.rb
@@ -416,6 +418,7 @@ files:
416
418
  - lib/HDLRuby/std/sequencer.rb
417
419
  - lib/HDLRuby/std/sequencer_channel.rb
418
420
  - lib/HDLRuby/std/sequencer_func.rb
421
+ - lib/HDLRuby/std/sequencer_sw.rb
419
422
  - lib/HDLRuby/std/sequencer_sync.rb
420
423
  - lib/HDLRuby/std/std.rb
421
424
  - lib/HDLRuby/std/task.rb
@@ -488,7 +491,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
488
491
  - !ruby/object:Gem::Version
489
492
  version: '0'
490
493
  requirements: []
491
- rubygems_version: 3.6.2
494
+ rubygems_version: 3.6.5
492
495
  specification_version: 4
493
496
  summary: HDLRuby is a library for describing and simulating digital electronic systems.
494
497
  test_files: []