axi_tdl 0.0.19 → 0.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 97a6adaec566d23b4b76a1c7396bc9b03c5d9f3de0afa0f5a6caa5e923e4c80a
4
- data.tar.gz: eb0d97cd60eb072a05341d39b983084ef6d601cad45af6d1205ad6162acd5b1c
3
+ metadata.gz: baeb52ac25e3aaa2c8a6207d9de9744e64f6264112db6667dddf704f547ddf8f
4
+ data.tar.gz: 52bc1a24600db46881c770564a2f8a38a00e5b6547ab2dba312020a206a3e1a8
5
5
  SHA512:
6
- metadata.gz: ae7440f8c8eaacd212546c1284f1b167fc5d48dc6f160ea8373991c9a17c139621c93e829d6c3c4cb3df06b266bf1ba6ebc439a94ba5e246cca3f8aed9ca66d1
7
- data.tar.gz: 9e9b7b861a12fb69f490ee1214975169b51582d277c19089124db252b148591c327e28639fa26c3b4720adc357b3716f0e5d7a6822cca5960e999586992365aa
6
+ metadata.gz: e262a33c8f90aa05558c9d71e2d7d1ab90e9b1dcca5e17ba5dfd0c1a77b1a41b06bfe07a054b39498f34fd027b0da5205b01c77db91303e97cb0ca74ea783eeb
7
+ data.tar.gz: 183f5a3421d04f6c418fea0c1fa5ec14a91a50a1ffd3902e3decc4cac8cc77b774f8031e6686f4948c6d30b9925618a9062900f30d5312e3464ed36c5763b842
@@ -1,3 +1,3 @@
1
1
  module AxiTdl
2
- VERSION = "0.0.19"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -5,7 +5,7 @@ _______________________________________
5
5
  descript:
6
6
  author : Cook.Darwin
7
7
  Version: VERA.0.0
8
- created: 2021-03-20 13:20:54 +0800
8
+ created: 2021-03-20 20:34:51 +0800
9
9
  madified:
10
10
  ***********************************************/
11
11
  `timescale 1ns/1ps
@@ -19,7 +19,7 @@ module test_module_var #(
19
19
 
20
20
  //==========================================================================
21
21
  //-------- define ----------------------------------------------------------
22
- localparam ASIZE = 20 ;
22
+ localparam ASIZE = 20;
23
23
  axi_stream_inf #(.DSIZE(8),.USIZE(1)) tmp_axis_inf (.aclk(clock),.aresetn(rst_n),.aclken(1'b1)) ;
24
24
  axi_stream_inf #(.DSIZE(8),.USIZE(1)) tmp_axis0_inf (.aclk(clock),.aresetn(rst_n),.aclken(1'b1)) ;
25
25
  axi_inf #(.DSIZE(32),.IDSIZE(2),.ASIZE(8),.LSIZE(9),.MODE("BOTH"),.ADDR_STEP(4294967295)) tmp_axi4_inf (.axi_aclk(clock),.axi_aresetn(rst_n)) ;
@@ -5,7 +5,7 @@ _______________________________________
5
5
  descript:
6
6
  author : Cook.Darwin
7
7
  Version: VERA.0.0
8
- created: 2021-03-20 13:24:07 +0800
8
+ created: 2021-03-21 10:19:17 +0800
9
9
  madified:
10
10
  ***********************************************/
11
11
  `timescale 1ns/1ps
@@ -29,5 +29,18 @@ class ClockManage < ItegrationVerb
29
29
 
30
30
  end
31
31
 
32
+ def_test_unit('test_clock_xx',__dir__) do
33
+ test_unit_init do
34
+
35
+ end
36
+ end
37
+
38
+ def_test_unit('test_clock_bb',__dir__) do
39
+ test_unit_init do
40
+
41
+ end
42
+ end
43
+
44
+
32
45
  end
33
46
 
@@ -0,0 +1,34 @@
1
+ /**********************************************
2
+ _______________________________________
3
+ ___________ Cook Darwin __________
4
+ _______________________________________
5
+ descript:
6
+ author : Cook.Darwin
7
+ Version: VERA.0.0
8
+ created: 2021-03-20 23:48:13 +0800
9
+ madified:
10
+ ***********************************************/
11
+ `timescale 1ns/1ps
12
+
13
+ module test_clock_bb(
14
+ input from_up_pass,
15
+ output logic to_down_pass
16
+ );
17
+
18
+ //==========================================================================
19
+ //-------- define ----------------------------------------------------------
20
+
21
+
22
+ //==========================================================================
23
+ //-------- instance --------------------------------------------------------
24
+
25
+ //==========================================================================
26
+ //-------- expression ------------------------------------------------------
27
+ initial begin
28
+ to_down_pass = 1'b0;
29
+ wait(from_up_pass);
30
+ $root.tb_test_tttop_sim.test_unit_region = "test_clock_bb";
31
+ to_down_pass = 1'b1;
32
+ end
33
+
34
+ endmodule
@@ -5,7 +5,7 @@ _______________________________________
5
5
  descript:
6
6
  author : Cook.Darwin
7
7
  Version: VERA.0.0
8
- created: xxxx.xx.xx
8
+ created: 2021-03-20 20:34:51 +0800
9
9
  madified:
10
10
  ***********************************************/
11
11
  `timescale 1ns/1ps
@@ -23,7 +23,7 @@ test_top rtl_top(
23
23
  //==========================================================================
24
24
  //-------- expression ------------------------------------------------------
25
25
  initial begin
26
- forever begin #(33ns);gl_clk = ~gl_clk;end;
26
+ forever begin #(33ns);gl_clk = ~gl_clk;end;
27
27
  end
28
28
 
29
29
  endmodule
@@ -5,7 +5,7 @@ _______________________________________
5
5
  descript:
6
6
  author : Cook.Darwin
7
7
  Version: VERA.0.0
8
- created: 2021-03-20 12:10:28 +0800
8
+ created: xxxx.xx.xx
9
9
  madified:
10
10
  ***********************************************/
11
11
  `timescale 1ns/1ps
@@ -0,0 +1,38 @@
1
+ /**********************************************
2
+ _______________________________________
3
+ ___________ Cook Darwin __________
4
+ _______________________________________
5
+ descript:
6
+ author : Cook.Darwin
7
+ Version: VERA.0.0
8
+ created: xxxx.xx.xx
9
+ madified:
10
+ ***********************************************/
11
+ `timescale 1ns/1ps
12
+
13
+ module tb_test_tttop_sim();
14
+ //==========================================================================
15
+ //-------- define ----------------------------------------------------------
16
+ logic gl_clk;
17
+ string test_unit_region;
18
+ logic unit_pass_u;
19
+ logic unit_pass_d;
20
+
21
+ //==========================================================================
22
+ //-------- instance --------------------------------------------------------
23
+ test_tttop_sim rtl_top(
24
+ /* input clock */.global_sys_clk (gl_clk )
25
+ );
26
+ test_clock_bb test_unit_0(
27
+ /* input */.from_up_pass (unit_pass_u ),
28
+ /* output */.to_down_pass (unit_pass_d )
29
+ );
30
+ //==========================================================================
31
+ //-------- expression ------------------------------------------------------
32
+ initial begin
33
+ forever begin #(33ns);gl_clk = ~gl_clk;end;
34
+ end
35
+
36
+ assign unit_pass_u = 1'b1;
37
+
38
+ endmodule
@@ -5,7 +5,7 @@ _______________________________________
5
5
  descript:
6
6
  author : Cook.Darwin
7
7
  Version: VERA.0.0
8
- created: xxxx.xx.xx
8
+ created: 2021-03-20 20:34:51 +0800
9
9
  madified:
10
10
  ***********************************************/
11
11
  `timescale 1ns/1ps
@@ -33,8 +33,8 @@ a_test_md a_test_md_inst(
33
33
  );
34
34
  //==========================================================================
35
35
  //-------- expression ------------------------------------------------------
36
- assign x_origin_inf.axis_tvalid = 1'b0;
37
- assign x_origin_inf.axis_tdata = '0;
38
- assign x_origin_inf.axis_tlast = 1'b0;
36
+ assign x_origin_inf.axis_tvalid = 1'b0;
37
+ assign x_origin_inf.axis_tdata = '0;
38
+ assign x_origin_inf.axis_tlast = 1'b0;
39
39
 
40
40
  endmodule
@@ -5,7 +5,7 @@ _______________________________________
5
5
  descript:
6
6
  author : Cook.Darwin
7
7
  Version: VERA.0.0
8
- created: xxxx.xx.xx
8
+ created: 2021-03-21 10:19:00 +0800
9
9
  madified:
10
10
  ***********************************************/
11
11
  `timescale 1ns/1ps
@@ -0,0 +1,9 @@
1
+
2
+ `timescale 1ns/1ps
3
+ module test_tttop_sim();
4
+ initial begin
5
+ #(1us);
6
+ $warning("Check TopModule.sim,please!!!");
7
+ $stop;
8
+ end
9
+ endmodule
@@ -8,4 +8,5 @@ TopModule.test_tttop(__dir__) do
8
8
  add_itegration('ClockManage',pins_map: :CM)
9
9
  add_itegration('ABlock')
10
10
 
11
+ add_test_unit('test_clock_bb')
11
12
  end
@@ -354,25 +354,25 @@ class ItegrationVerb
354
354
  _names_pool_inst()
355
355
  # @itgt_links = ItgtLinks.new(self)
356
356
  ## 为child module 生成方法
357
- init_children_modules()
357
+ # init_children_modules()
358
358
  # init_children_modules_post()
359
359
  end
360
360
 
361
- def init_children_modules
362
- blocks_hash = self.class.instance_variable_get("@_sdl_eval_blocks_hash_") || {}
363
- blocks_hash_post = self.class.instance_variable_get("@_sdl_eval_blocks_post_hash_") || {}
364
- dir_hash = self.class.instance_variable_get("@_sdl_eval_dir_hash_")
361
+ # def init_children_modules
362
+ # blocks_hash = self.class.instance_variable_get("@_sdl_eval_blocks_hash_") || {}
363
+ # blocks_hash_post = self.class.instance_variable_get("@_sdl_eval_blocks_post_hash_") || {}
364
+ # dir_hash = self.class.instance_variable_get("@_sdl_eval_dir_hash_")
365
365
 
366
- blocks_hash = blocks_hash.merge blocks_hash_post
366
+ # blocks_hash = blocks_hash.merge blocks_hash_post
367
367
 
368
- blocks_hash.keys.each do |key|
368
+ # blocks_hash.keys.each do |key|
369
369
 
370
- sdlm = SdlModule.new(name:self.class.to_s + "_#{@nickname}#{key}",out_sv_path:dir_hash[key])
371
- define_singleton_method(key) do
372
- sdlm
373
- end
374
- end
375
- end
370
+ # sdlm = SdlModule.new(name:self.class.to_s + "_#{@nickname}#{key}",out_sv_path:dir_hash[key])
371
+ # define_singleton_method(key) do
372
+ # sdlm
373
+ # end
374
+ # end
375
+ # end
376
376
 
377
377
  # def init_children_modules_post
378
378
  # blocks_hash = self.class.instance_variable_get("@_sdl_eval_blocks_post_hash_")
@@ -387,20 +387,20 @@ class ItegrationVerb
387
387
  # end
388
388
  # end
389
389
 
390
- def gen_children_modules
391
- blocks_hash = self.class.instance_variable_get("@_sdl_eval_blocks_hash_") || {}
392
- blocks_hash_post = self.class.instance_variable_get("@_sdl_eval_blocks_post_hash_") || {}
393
- blocks_hash = blocks_hash.merge blocks_hash_post
394
- blocks_hash.keys.each do |key|
395
- self.send(key).gen_sv_module()
396
- end
397
- end
390
+ # def gen_children_modules
391
+ # blocks_hash = self.class.instance_variable_get("@_sdl_eval_blocks_hash_") || {}
392
+ # blocks_hash_post = self.class.instance_variable_get("@_sdl_eval_blocks_post_hash_") || {}
393
+ # blocks_hash = blocks_hash.merge blocks_hash_post
394
+ # blocks_hash.keys.each do |key|
395
+ # self.send(key).gen_sv_module()
396
+ # end
397
+ # end
398
398
 
399
399
  # define_singleton_method(:inst) do
400
400
  def inst
401
401
  # 先生成子模块
402
402
  ## 执行 生成 sdl module
403
- inst_child_module()
403
+ # inst_child_module()
404
404
 
405
405
  blocks = self.class.instance_variable_get("@_inst_blocks_")
406
406
  ItegrationVerb.curr_itgt_push(self)
@@ -422,7 +422,7 @@ class ItegrationVerb
422
422
  end
423
423
 
424
424
  ## 执行 生成 sdl module
425
- inst_child_module_post()
425
+ # inst_child_module_post()
426
426
 
427
427
  ## 执行top module techbench eval
428
428
  tb_inst()
@@ -431,7 +431,8 @@ class ItegrationVerb
431
431
  ## 执行 约束
432
432
  inst_constraints()
433
433
  ## 执行单元测试
434
- test_unit_inst()
434
+ ## 改到 运行 top_module _exec_add_test_unit 那边执行
435
+ # test_unit_inst()
435
436
  end
436
437
 
437
438
  def tb_inst
@@ -464,8 +465,11 @@ class ItegrationVerb
464
465
  return if blocks.empty?
465
466
  ItegrationVerb.curr_itgt_push self
466
467
 
467
- return unless TopModule.sim
468
-
468
+ unless TopModule.sim
469
+ ItegrationVerb.curr_itgt_pop
470
+ return
471
+ end
472
+
469
473
  blocks.each do |b|
470
474
  # @top_module.techbench.instance_exec(self,&b.clone)
471
475
  sdlm = TestUnitModule.new(name: b[0],out_sv_path: b[1])
@@ -486,62 +490,94 @@ class ItegrationVerb
486
490
 
487
491
  end
488
492
 
489
- def inst_child_module
490
- blocks_hash = self.class.instance_variable_get("@_sdl_eval_blocks_hash_")
491
- return unless blocks_hash
492
- ItegrationVerb.curr_itgt_push self
493
- $_implicit_curr_itgt_.with_none_itgt do
494
- blocks_hash.keys.each do |key|
495
- sdlm = self.send(key)
496
-
497
-
498
- blocks = blocks_hash[key]
499
- if blocks.length == 1
500
- block = blocks[0]
501
- sdlm.instance_exec(self,&block)
502
- elsif blocks.length > 1
503
- # block = Proc.new do
504
- blocks.each do |b|
505
- # b.call
506
- sdlm.instance_exec(self,&b)
507
- end
508
- # end
509
- else
510
- ;
511
- end
512
- end
513
- end
514
- ItegrationVerb.curr_itgt_pop
515
- end
493
+ def self.test_unit_inst(&filter_block)
494
+ # blocks = self.instance_variable_get("@_inst_test_unit_blocks_")
495
+ # blocks = instance_variable_get("@_inst_test_unit_blocks_") || []
496
+ blocks = @@_inst_test_unit_blocks_
497
+ return unless blocks
498
+ return if blocks.empty?
499
+ return unless TopModule.sim
516
500
 
517
- def inst_child_module_post
518
- blocks_hash = self.class.instance_variable_get("@_sdl_eval_blocks_post_hash_")
519
- return unless blocks_hash
520
- ItegrationVerb.curr_itgt_push self
521
- $_implicit_curr_itgt_.with_none_itgt do
522
- blocks_hash.keys.each do |key|
523
- sdlm = self.send(key)
524
- # $_implicit_curr_itgt_ = self
501
+ ItegrationVerb.curr_itgt_push nil
525
502
 
526
- blocks = blocks_hash[key]
527
- if blocks.length == 1
528
- block = blocks[0]
529
- sdlm.instance_exec(self,&block)
530
- elsif blocks.length > 1
531
- # block = Proc.new do
532
- blocks.each do |b|
533
- # b.call
534
- sdlm.instance_exec(self,&b)
535
- end
536
- # end
537
- else
538
- next
503
+ blocks.each do |b|
504
+ # @top_module.techbench.instance_exec(self,&b.clone)
505
+ if !(block_given?) || filter_block.call(b[0])
506
+ sdlm = TestUnitModule.new(name: b[0],out_sv_path: b[1])
507
+ $_implicit_curr_itgt_.with_none_itgt do
508
+ sdlm.input - "from_up_pass"
509
+ sdlm.output.logic - "to_down_pass"
510
+ end
511
+ sdlm.instance_exec(nil,&b[2])
512
+
513
+ if b[1] && File.exist?(b[1])
514
+ sdlm.gen_sv_module
515
+ else
516
+ sdlm.origin_sv = true
539
517
  end
540
518
  end
541
519
  end
520
+
542
521
  ItegrationVerb.curr_itgt_pop
522
+
543
523
  end
544
524
 
525
+ # def inst_child_module
526
+ # blocks_hash = self.class.instance_variable_get("@_sdl_eval_blocks_hash_")
527
+ # return unless blocks_hash
528
+ # ItegrationVerb.curr_itgt_push self
529
+ # $_implicit_curr_itgt_.with_none_itgt do
530
+ # blocks_hash.keys.each do |key|
531
+ # sdlm = self.send(key)
532
+
533
+
534
+ # blocks = blocks_hash[key]
535
+ # if blocks.length == 1
536
+ # block = blocks[0]
537
+ # sdlm.instance_exec(self,&block)
538
+ # elsif blocks.length > 1
539
+ # # block = Proc.new do
540
+ # blocks.each do |b|
541
+ # # b.call
542
+ # sdlm.instance_exec(self,&b)
543
+ # end
544
+ # # end
545
+ # else
546
+ # ;
547
+ # end
548
+ # end
549
+ # end
550
+ # ItegrationVerb.curr_itgt_pop
551
+ # end
552
+
553
+ # def inst_child_module_post
554
+ # blocks_hash = self.class.instance_variable_get("@_sdl_eval_blocks_post_hash_")
555
+ # return unless blocks_hash
556
+ # ItegrationVerb.curr_itgt_push self
557
+ # $_implicit_curr_itgt_.with_none_itgt do
558
+ # blocks_hash.keys.each do |key|
559
+ # sdlm = self.send(key)
560
+ # # $_implicit_curr_itgt_ = self
561
+
562
+ # blocks = blocks_hash[key]
563
+ # if blocks.length == 1
564
+ # block = blocks[0]
565
+ # sdlm.instance_exec(self,&block)
566
+ # elsif blocks.length > 1
567
+ # # block = Proc.new do
568
+ # blocks.each do |b|
569
+ # # b.call
570
+ # sdlm.instance_exec(self,&b)
571
+ # end
572
+ # # end
573
+ # else
574
+ # next
575
+ # end
576
+ # end
577
+ # end
578
+ # ItegrationVerb.curr_itgt_pop
579
+ # end
580
+
545
581
  def self.inherited(subclass)
546
582
  unless @@child.include? subclass
547
583
  @@child << subclass
@@ -589,7 +625,7 @@ class ItegrationVerb
589
625
  public
590
626
  def check_same_method(name)
591
627
  if respond_to? name.to_s
592
- raise TdlError.new("Itegration can't Redefine method #{name}")
628
+ raise TdlError.new("Itegration `#{to_s}` can't Redefine method #{name}")
593
629
  end
594
630
  end
595
631
 
@@ -736,63 +772,64 @@ class ItegrationVerb
736
772
  ## 添加测试用例
737
773
 
738
774
  def self.def_test_unit(name,path,&block)
739
- _inst_test_unit_blocks_ = instance_variable_get("@_inst_test_unit_blocks_")
740
- _inst_test_unit_blocks_ ||= []
741
- _inst_test_unit_blocks_ << [name.to_s, path, block]
742
- instance_variable_set("@_inst_test_unit_blocks_",_inst_test_unit_blocks_)
775
+ # @@_inst_test_unit_blocks_ = instance_variable_get("@_inst_test_unit_blocks_")
776
+ @@_inst_test_unit_blocks_ ||= []
777
+ @@_inst_test_unit_blocks_ << [name.to_s, path, block]
778
+ # instance_variable_set("@_inst_test_unit_blocks_",_inst_test_unit_blocks_)
779
+ @@_inst_test_unit_blocks_
743
780
  end
744
781
 
745
782
  ## 生成 itgt内的模块,
746
- def self.has_module(dir,*names)
747
- unless File.exist? dir
748
- Dir.mkdir dir
749
- end
750
- ## itgt 生成 sdl 模块
751
- names.each do |name|
752
- # unless container_hash[name.to_s]
753
- # container_hash[name.to_s] = []
754
- # end
755
- self.define_singleton_method("#{name}_sdl_eval") do |&block|
756
- _sdl_eval_blocks_hash_ = instance_variable_get("@_sdl_eval_blocks_hash_")
757
- _sdl_eval_dir_hash_ = instance_variable_get("@_sdl_eval_dir_hash_")
758
- _sdl_eval_blocks_hash_ ||= {}
759
- _sdl_eval_dir_hash_ ||= {}
760
-
761
- if _sdl_eval_blocks_hash_[name]
762
- _sdl_eval_blocks_hash_[name] << block
763
- # _sdl_eval_blocks_hash_[name] << $_implicit_curr_itgt_.wrap_nont_itgt(&block)
764
- # _sdl_eval_blocks_hash_[name] << lambda {|itgt| block.call }
765
- else
766
- _sdl_eval_blocks_hash_[name] = [block]
767
- # _sdl_eval_blocks_hash_[name] = [$_implicit_curr_itgt_.wrap_nont_itgt(&block)]
768
- # _sdl_eval_blocks_hash_[name] == [ lambda {|itgt| block.call }]
769
- end
770
-
771
- _sdl_eval_dir_hash_[name] = dir if dir
772
- instance_variable_set("@_sdl_eval_dir_hash_",_sdl_eval_dir_hash_)
773
- instance_variable_set("@_sdl_eval_blocks_hash_",_sdl_eval_blocks_hash_)
774
- end
775
- ## 在 top_module 后再执行
776
- self.define_singleton_method("#{name}_sdl_post_eval") do |&block|
777
- $_implicit_curr_itgt_.with_none_itgt do
778
- _blocks_hash_ = instance_variable_get("@_sdl_eval_blocks_post_hash_")
779
- _sdl_eval_dir_hash_ = instance_variable_get("@_sdl_eval_dir_hash_")
780
- _blocks_hash_ ||= {}
781
- _sdl_eval_dir_hash_ ||= {}
782
-
783
- if _blocks_hash_[name]
784
- _blocks_hash_[name] << block #$_implicit_curr_itgt_.wrap_nont_itgt(&block)
785
- else
786
- _blocks_hash_[name] = [block] #[$_implicit_curr_itgt_.wrap_nont_itgt(&block)]
787
- end
788
-
789
- _sdl_eval_dir_hash_[name] = dir if dir
790
- instance_variable_set("@_sdl_eval_dir_hash_",_sdl_eval_dir_hash_)
791
- instance_variable_set("@_sdl_eval_blocks_post_hash_",_blocks_hash_)
792
- end
793
- end
794
- end
795
- end
783
+ # def self.has_module(dir,*names)
784
+ # unless File.exist? dir
785
+ # Dir.mkdir dir
786
+ # end
787
+ # ## itgt 生成 sdl 模块
788
+ # names.each do |name|
789
+ # # unless container_hash[name.to_s]
790
+ # # container_hash[name.to_s] = []
791
+ # # end
792
+ # self.define_singleton_method("#{name}_sdl_eval") do |&block|
793
+ # _sdl_eval_blocks_hash_ = instance_variable_get("@_sdl_eval_blocks_hash_")
794
+ # _sdl_eval_dir_hash_ = instance_variable_get("@_sdl_eval_dir_hash_")
795
+ # _sdl_eval_blocks_hash_ ||= {}
796
+ # _sdl_eval_dir_hash_ ||= {}
797
+
798
+ # if _sdl_eval_blocks_hash_[name]
799
+ # _sdl_eval_blocks_hash_[name] << block
800
+ # # _sdl_eval_blocks_hash_[name] << $_implicit_curr_itgt_.wrap_nont_itgt(&block)
801
+ # # _sdl_eval_blocks_hash_[name] << lambda {|itgt| block.call }
802
+ # else
803
+ # _sdl_eval_blocks_hash_[name] = [block]
804
+ # # _sdl_eval_blocks_hash_[name] = [$_implicit_curr_itgt_.wrap_nont_itgt(&block)]
805
+ # # _sdl_eval_blocks_hash_[name] == [ lambda {|itgt| block.call }]
806
+ # end
807
+
808
+ # _sdl_eval_dir_hash_[name] = dir if dir
809
+ # instance_variable_set("@_sdl_eval_dir_hash_",_sdl_eval_dir_hash_)
810
+ # instance_variable_set("@_sdl_eval_blocks_hash_",_sdl_eval_blocks_hash_)
811
+ # end
812
+ # ## 在 top_module 后再执行
813
+ # self.define_singleton_method("#{name}_sdl_post_eval") do |&block|
814
+ # $_implicit_curr_itgt_.with_none_itgt do
815
+ # _blocks_hash_ = instance_variable_get("@_sdl_eval_blocks_post_hash_")
816
+ # _sdl_eval_dir_hash_ = instance_variable_get("@_sdl_eval_dir_hash_")
817
+ # _blocks_hash_ ||= {}
818
+ # _sdl_eval_dir_hash_ ||= {}
819
+
820
+ # if _blocks_hash_[name]
821
+ # _blocks_hash_[name] << block #$_implicit_curr_itgt_.wrap_nont_itgt(&block)
822
+ # else
823
+ # _blocks_hash_[name] = [block] #[$_implicit_curr_itgt_.wrap_nont_itgt(&block)]
824
+ # end
825
+
826
+ # _sdl_eval_dir_hash_[name] = dir if dir
827
+ # instance_variable_set("@_sdl_eval_dir_hash_",_sdl_eval_dir_hash_)
828
+ # instance_variable_set("@_sdl_eval_blocks_post_hash_",_blocks_hash_)
829
+ # end
830
+ # end
831
+ # end
832
+ # end
796
833
 
797
834
  def self.record_instance_var_block(name,default=[],&block)
798
835
  _inst_ccc_ = instance_variable_get("@_#{name}_")
@@ -64,7 +64,7 @@ class SdlModule
64
64
  end
65
65
  else
66
66
  File.open(File.join(@out_sv_path,"#{module_name}.sv"),"w") do |f|
67
- f.print build_module(ex_param:ex_param,ex_port:ex_port,ex_up_code:ex_up_code,ex_down_code:ex_down_code)
67
+ f.print build_module_verb(ex_param:ex_param,ex_port:ex_port,ex_up_code:ex_up_code,ex_down_code:ex_down_code).join("")
68
68
  end
69
69
  end
70
70
  end
@@ -325,6 +325,12 @@ class TopModule
325
325
  def _exec_add_test_unit
326
326
  @_test_unit_collect_ ||= []
327
327
  args = @_test_unit_collect_
328
+ ## 例化需要的itgt test unit
329
+ # ItegrationVerb.test_unit_inst
330
+ ItegrationVerb.test_unit_inst do |name|
331
+ args.include? name.to_s
332
+ end
333
+
328
334
  self.techbench.instance_exec(args) do |args|
329
335
  index = 0
330
336
  last_index = 0
@@ -154,17 +154,16 @@ endmodule\n"
154
154
  end
155
155
 
156
156
  ## 生成 itgt下的子模块文件
157
- # gen_children_modules
158
- @_itgt_collect_.each do |itgt|
159
- itgt.gen_children_modules()
160
- end
157
+ # @_itgt_collect_.each do |itgt|
158
+ # itgt.gen_children_modules()
159
+ # end
161
160
 
162
- if implicit_itgt_collect
163
- ## 执行 itegration_verb 里面的silence
164
- implicit_itgt_collect.each do |itgt|
165
- itgt.gen_children_modules()
166
- end
167
- end
161
+ # if implicit_itgt_collect
162
+ # ## 执行 itegration_verb 里面的silence
163
+ # implicit_itgt_collect.each do |itgt|
164
+ # itgt.gen_children_modules()
165
+ # end
166
+ # end
168
167
 
169
168
  end
170
169
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: axi_tdl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.19
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cook.Darwin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-20 00:00:00.000000000 Z
11
+ date: 2021-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -1204,14 +1204,17 @@ files:
1204
1204
  - lib/tdl/examples/9_itegration/clock_manage/itgt_module_clock_manage.rb
1205
1205
  - lib/tdl/examples/9_itegration/clock_manage/simple_clock.rb
1206
1206
  - lib/tdl/examples/9_itegration/clock_manage/simple_clock.sv
1207
+ - lib/tdl/examples/9_itegration/clock_manage/test_clock_bb.sv
1207
1208
  - lib/tdl/examples/9_itegration/dve.tcl
1208
1209
  - lib/tdl/examples/9_itegration/pins.yml
1209
1210
  - lib/tdl/examples/9_itegration/tb_test_top.sv
1210
1211
  - lib/tdl/examples/9_itegration/tb_test_tttop.sv
1212
+ - lib/tdl/examples/9_itegration/tb_test_tttop_sim.sv
1211
1213
  - lib/tdl/examples/9_itegration/test_top.sv
1212
1214
  - lib/tdl/examples/9_itegration/test_top_constraints.xdc
1213
1215
  - lib/tdl/examples/9_itegration/test_tttop.sv
1214
1216
  - lib/tdl/examples/9_itegration/test_tttop_constraints.xdc
1217
+ - lib/tdl/examples/9_itegration/test_tttop_sim.sv
1215
1218
  - lib/tdl/examples/9_itegration/top.rb
1216
1219
  - lib/tdl/examples/readme.md
1217
1220
  - lib/tdl/exlib/axis_eth_ex.rb