axi_tdl 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8dd62863539fff2708246a09927e479738b03d047133e734cc55f4e1829d6b54
4
- data.tar.gz: ceb59ee036e1cefc3a21556a332e66b65f0c0dc57fab062614557546ca718b3f
3
+ metadata.gz: cbd04437f9a54f453a70249ea3800e0ad83b7afca7b2eb8aa4e968160a44b714
4
+ data.tar.gz: 4e0e182673271971834246838aa7f2d2735bf6c16ec8d02bf6cecacc63ef9f9d
5
5
  SHA512:
6
- metadata.gz: ecd12a65dc60bb8fb9eb2566df28cef78903c4660dd14606c08f9cd7192b5b4a0f51d7c2aa9c7ff95db88087b5f0123a0c5de66152ddd512f845e5f78d114377
7
- data.tar.gz: 889d28213cbdc3bfc5179bb347902828af30008573030725e309bd227ee013e34906b2b967de83bb52480a04091c328a1ed42ae9d805bcf4e6d3f96816f19bd5
6
+ metadata.gz: 756a91a926f7933d0b9f282bc10effc50f7505026b31b15ae4af55e0229bd515687fe30ba35b4d5593ba313655e46643e29089292456079475c7ac6baa9ea562
7
+ data.tar.gz: 5100e94f2d061d83cf6f0caae29401bfaefefa15bb5f911d6fbf9b84c5aba9bcb891bee496761b76c9e6b1627a57917d7a9e0ac60e4c549699ef475894c7dd3a
@@ -12,7 +12,8 @@ madified:
12
12
  ***********************************************/
13
13
  `timescale 1ns/1ps
14
14
  module axi4_mix_interconnect_M2S #(
15
- parameter NUM = 8
15
+ parameter NUM = 8,
16
+ parameter MASTER_IDSIZE = 8
16
17
  )(
17
18
  axi_inf.slaver slaver [NUM-1:0],
18
19
  axi_inf.master master
@@ -38,7 +39,8 @@ axi4_wr_interconnect_M2S_A1 #( //axi4 dont support write burst out-of-order
38
39
  // );
39
40
 
40
41
  axi4_rd_mix_interconnect_M2S_A2 #(
41
- .NUM (NUM )
42
+ .NUM (NUM ),
43
+ .MASTER_IDSIZE (MASTER_IDSIZE)
42
44
  )axi4_rd_mix_interconnect_M2S_inst(
43
45
  /* axi_inf.slaver_rd */ .slaver (`slaver_vcs_cptRead ), //[NUM-1:0],
44
46
  /* axi_inf.master_rd */ .master (`master_vcs_cptRead )
@@ -14,7 +14,8 @@ madified:
14
14
  ***********************************************/
15
15
  `timescale 1ns/1ps
16
16
  module axi4_rd_mix_interconnect_M2S_A2 #(
17
- parameter NUM = 8
17
+ parameter NUM = 8,
18
+ parameter MASTER_IDSIZE = 8
18
19
  )(
19
20
  axi_inf.slaver_rd slaver [NUM-1:0],
20
21
  axi_inf.master_rd master
@@ -24,7 +25,8 @@ localparam NSIZE = $clog2(NUM);
24
25
  import SystemPkg::*;
25
26
 
26
27
  // localparam LAZISE = slaver[0].IDSIZE;
27
- localparam LAZISE = master.IDSIZE - NSIZE;
28
+ // localparam LAZISE = master.IDSIZE - NSIZE;
29
+ localparam LAZISE = MASTER_IDSIZE - NSIZE;
28
30
 
29
31
  initial begin
30
32
  // assert(slaver[0].IDSIZE+NSIZE == master.IDSIZE)
@@ -44,8 +44,10 @@ TdlBuild.axi4_partition_rd_verb(__dir__) do
44
44
  h.input.wr_en partition_pulse_inf.vld_rdy
45
45
  h.output['DSIZE'].rdata ''.to_nq
46
46
  h.input.rd_en short_inf.axi_rvalid & short_inf.axi_rready & short_inf.axi_rlast
47
- h.output.logic.empty debugLogic.fifo_empty
48
- h.output.logic.full debugLogic.fifo_full
47
+ # h.output.logic.empty debugLogic.fifo_empty
48
+ # h.output.logic.full debugLogic.fifo_full
49
+ h.output.logic.empty logic.fifo_empty
50
+ h.output.logic.full logic.fifo_full
49
51
  end
50
52
 
51
53
  Assign do
@@ -0,0 +1,163 @@
1
+ /**********************************************
2
+ _______________________________________
3
+ ___________ Cook Darwin __________
4
+ _______________________________________
5
+ descript:
6
+ author : Cook.Darwin
7
+ Version: VERA.1.0
8
+ addr start num
9
+ Version: VERA.2.0
10
+ length can be 1
11
+ Version: VERA.3.0
12
+ can be reset
13
+ creaded:
14
+ madified:
15
+ ***********************************************/
16
+ `timescale 1ns/1ps
17
+ module gen_origin_axis_A3 #(
18
+ `parameter_string MODE = "RANGE"
19
+ )(
20
+ input reset,
21
+ input enable,
22
+ output logic ready,
23
+ input [31:0] length, // '1' meet 1 length
24
+ input [31:0] start,
25
+ axi_stream_inf.master axis_out
26
+ );
27
+
28
+ import DataInterfacePkg::*;
29
+
30
+ wire clock,rst_n;
31
+
32
+ assign clock = axis_out.aclk;
33
+ assign rst_n = axis_out.aresetn;
34
+
35
+ assign axis_out.axis_tuser = 1'b0;
36
+ assign axis_out.axis_tkeep = '1;
37
+
38
+ typedef enum {IDLE,SEND_DATA,FRAME_DONE} STATUS;
39
+
40
+ STATUS cstate,nstate;
41
+
42
+ always@(posedge clock/*,negedge rst_n*/)
43
+ if(~rst_n || reset)
44
+ cstate <= IDLE;
45
+ else cstate <= nstate;
46
+
47
+ // logic data_ok;
48
+
49
+ always@(*)
50
+ case(cstate)
51
+ IDLE:
52
+ if(enable && ready)
53
+ nstate = SEND_DATA;
54
+ else nstate = IDLE;
55
+ SEND_DATA:
56
+ if(axis_out.axis_tvalid && axis_out.axis_tready && axis_out.axis_tlast && axis_out.aclken)
57
+ nstate = IDLE;
58
+ else nstate = SEND_DATA;
59
+ FRAME_DONE:
60
+ // if(!enable)
61
+ nstate = IDLE;
62
+ // else nstate = FRAME_DONE;
63
+ default: nstate = IDLE;
64
+ endcase
65
+
66
+ // always@(posedge clock/*,negedge rst_n*/)
67
+ // if(~rst_n) axis_out.axis_tdata <= start;
68
+ // else begin
69
+ // if(axis_out.axis_tvalid && axis_out.axis_tready && axis_out.aclken)
70
+ // if(axis_out.axis_tdata < (start+length-1))begin
71
+ // if(MODE == "RANGE")
72
+ // axis_out.axis_tdata <= axis_out.axis_tdata + 1'b1;
73
+ // else axis_out.axis_tdata <= start;
74
+ // end
75
+ // else axis_out.axis_tdata <= start;
76
+ // else axis_out.axis_tdata <= axis_out.axis_tdata;
77
+ // end
78
+
79
+ always@(posedge clock/*,negedge rst_n*/)
80
+ if(~rst_n || reset) axis_out.axis_tdata <= start;
81
+ else
82
+ case(nstate)
83
+ IDLE: axis_out.axis_tdata <= start;
84
+ SEND_DATA:begin
85
+ if(enable && ready)
86
+ axis_out.axis_tdata <= start;
87
+ else if(axis_out.axis_tvalid && axis_out.axis_tready && axis_out.aclken)begin
88
+ // axis_out.axis_tdata <= axis_out.axis_tdata + 1'b1;
89
+ if(MODE == "RANGE")
90
+ axis_out.axis_tdata <= axis_out.axis_tdata + 1'b1;
91
+ else axis_out.axis_tdata <= start;
92
+ end else
93
+ axis_out.axis_tdata <= axis_out.axis_tdata;
94
+ end
95
+ default:;
96
+ endcase
97
+
98
+ always@(posedge clock/*,negedge rst_n*/)
99
+ if(~rst_n || reset) axis_out.axis_tvalid <= 1'b0;
100
+ else
101
+ case(nstate)
102
+ SEND_DATA: axis_out.axis_tvalid <= 1'b1;
103
+ default: axis_out.axis_tvalid <= 1'b0;
104
+ endcase
105
+
106
+
107
+ // reg [31:0] cnt ;
108
+ // always@(posedge clock/*,negedge rst_n*/)
109
+ // if(~rst_n) cnt <= '0;
110
+ // else begin
111
+ // if(axis_out.axis_tvalid && axis_out.axis_tready && axis_out.aclken)
112
+ // if(cnt < (length-1))
113
+ // cnt <= cnt + 1'b1;
114
+ // else cnt <= '0;
115
+ // else cnt <= cnt;
116
+ // end
117
+
118
+ //
119
+ logic [31:0] lock_length;
120
+ always@(posedge clock/*,negedge rst_n*/)begin
121
+ if(~rst_n || reset) lock_length <= '0;
122
+ else begin
123
+ if(enable && ready)
124
+ lock_length <= length;
125
+ else lock_length <= lock_length;
126
+ end
127
+ end
128
+
129
+ always@(posedge clock/*,negedge rst_n*/)
130
+ if(~rst_n || reset) axis_out.axis_tlast <= 1'b0;
131
+ else begin
132
+ // if(axis_out.aclken)
133
+ // if(length > 1)
134
+ // axis_out.axis_tlast <= pipe_last_func(axis_out.axis_tvalid,axis_out.axis_tready,axis_out.axis_tlast,(cnt==length-2));
135
+ // else axis_out.axis_tlast <= 1'b1;
136
+ // else axis_out.axis_tlast <= 1'b0;
137
+ if(axis_out.aclken)begin
138
+ if(enable && ready)begin
139
+ axis_out.axis_tlast <= length < 2;
140
+ end else if(axis_out.axis_tvalid && axis_out.axis_tready && axis_out.axis_tlast && axis_out.aclken)begin
141
+ axis_out.axis_tlast <= 1'b0;
142
+ end else if(axis_out.axis_tvalid && axis_out.axis_tready && axis_out.axis_tcnt==lock_length-2 && axis_out.aclken )begin
143
+ axis_out.axis_tlast <= 1'b1;
144
+ end else begin
145
+ axis_out.axis_tlast <= axis_out.axis_tlast;
146
+ end
147
+ end else begin
148
+ axis_out.axis_tlast <= axis_out.axis_tlast;
149
+ end
150
+ end
151
+
152
+ // assign data_ok = axis_out.axis_tlast && axis_out.axis_tready && axis_out.axis_tvalid;
153
+
154
+ always@(posedge clock/*,negedge rst_n*/)
155
+ if(~rst_n || reset) ready <= 1'b0;
156
+ else
157
+ case(nstate)
158
+ IDLE: ready <= 1'b1;
159
+ default: ready <= 1'b0;
160
+ endcase
161
+
162
+
163
+ endmodule
@@ -4,8 +4,8 @@ ___________ Cook Darwin __________
4
4
  _______________________________________
5
5
  descript:
6
6
  author : Cook.Darwin
7
- Version:
8
- creaded: XXXX.XX.XX
7
+ Version: VERA.0.0
8
+ creaded:
9
9
  madified:
10
10
  ***********************************************/
11
11
  `timescale 1ns/1ps
@@ -48,22 +48,22 @@ for(genvar KK0=0;KK0 < LAT;KK0++)begin
48
48
  endgenerate
49
49
  //-------- CLOCKs Total 2 ----------------------
50
50
  //--->> CheckClock <<----------------
51
- logic cc_done_10,cc_same_10;
52
- integer cc_afreq_10,cc_bfreq_10;
53
- ClockSameDomain CheckPClock_inst_10(
51
+ logic cc_done_28,cc_same_28;
52
+ integer cc_afreq_28,cc_bfreq_28;
53
+ ClockSameDomain CheckPClock_inst_28(
54
54
  /* input */ .aclk (in_inf.clock ),
55
55
  /* input */ .bclk (out_inf.clock ),
56
- /* output logic */ .done (cc_done_10),
57
- /* output logic */ .same (cc_same_10),
58
- /* output integer */ .aFreqK (cc_afreq_10),
59
- /* output integer */ .bFreqK (cc_bfreq_10)
56
+ /* output logic */ .done (cc_done_28),
57
+ /* output logic */ .same (cc_same_28),
58
+ /* output integer */ .aFreqK (cc_afreq_28),
59
+ /* output integer */ .bFreqK (cc_bfreq_28)
60
60
  );
61
61
 
62
62
  initial begin
63
- wait(cc_done_10);
64
- assert(cc_same_10)
63
+ wait(cc_done_28);
64
+ assert(cc_same_28)
65
65
  else begin
66
- $error("--- Error : `data_c_pipe_sync_seam` clock is not same, in_inf.clock< %0f M> != out_inf.clock<%0f M>",1000000.0/cc_afreq_10, 1000000.0/cc_bfreq_10);
66
+ $error("--- Error : `data_c_pipe_sync_seam` clock is not same, in_inf.clock< %0f M> != out_inf.clock<%0f M>",1000000.0/cc_afreq_28, 1000000.0/cc_bfreq_28);
67
67
  repeat(10)begin
68
68
  @(posedge in_inf.clock);
69
69
  end
@@ -1,3 +1,3 @@
1
1
  module AxiTdl
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
@@ -5,7 +5,7 @@ _______________________________________
5
5
  descript:
6
6
  author : Cook.Darwin
7
7
  Version: VERA.0.0
8
- created: 2022-07-10 11:18:43 +0800
8
+ created: 2023-08-16 21:22:47 +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),.FreqM(100),.USIZE(1)) tmp_axis_inf (.aclk(clock),.aresetn(rst_n),.aclken(1'b1)) ;
24
24
  axi_stream_inf #(.DSIZE(8),.FreqM(100),.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),.FreqM(100)) 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: 2023-02-17 21:27:54 +0800
8
+ created: 2023-08-16 21:22:48 +0800
9
9
  madified:
10
10
  ***********************************************/
11
11
  `timescale 1ns/1ps
@@ -1,28 +1,9 @@
1
- /**********************************************
2
- _______________________________________
3
- ___________ Cook Darwin __________
4
- _______________________________________
5
- descript:
6
- author : Cook.Darwin
7
- Version: VERA.0.0
8
- created: 2023-02-17 21:27:53 +0800
9
- madified:
10
- ***********************************************/
11
- `timescale 1ns/1ps
12
-
13
- module test_top (
14
- input sys_clock,
15
- output logic[3:0] odata
16
- );
17
-
18
- //==========================================================================
19
- //-------- define ----------------------------------------------------------
20
-
21
-
22
- //==========================================================================
23
- //-------- instance --------------------------------------------------------
24
-
25
- //==========================================================================
26
- //-------- expression ------------------------------------------------------
27
1
 
2
+ `timescale 1ns/1ps
3
+ module test_top();
4
+ initial begin
5
+ #(1us);
6
+ $warning("Check TopModule.sim,please!!!");
7
+ $stop;
8
+ end
28
9
  endmodule
@@ -1,9 +1,28 @@
1
-
1
+ /**********************************************
2
+ _______________________________________
3
+ ___________ Cook Darwin __________
4
+ _______________________________________
5
+ descript:
6
+ author : Cook.Darwin
7
+ Version: VERA.0.0
8
+ created: 2023-08-16 21:22:32 +0800
9
+ madified:
10
+ ***********************************************/
2
11
  `timescale 1ns/1ps
3
- module test_top_sim();
4
- initial begin
5
- #(1us);
6
- $warning("Check TopModule.sim,please!!!");
7
- $stop;
8
- end
12
+
13
+ module test_top_sim (
14
+ input sys_clock,
15
+ output logic[3:0] odata
16
+ );
17
+
18
+ //==========================================================================
19
+ //-------- define ----------------------------------------------------------
20
+
21
+
22
+ //==========================================================================
23
+ //-------- instance --------------------------------------------------------
24
+
25
+ //==========================================================================
26
+ //-------- expression ------------------------------------------------------
27
+
9
28
  endmodule
@@ -1,40 +1,9 @@
1
- /**********************************************
2
- _______________________________________
3
- ___________ Cook Darwin __________
4
- _______________________________________
5
- descript:
6
- author : Cook.Darwin
7
- Version: VERA.0.0
8
- created: 2022-07-10 11:21:57 +0800
9
- madified:
10
- ***********************************************/
11
- `timescale 1ns/1ps
12
-
13
- module test_tttop (
14
- input global_sys_clk
15
- );
16
-
17
- //==========================================================================
18
- //-------- define ----------------------------------------------------------
19
- logic clock_100M;
20
- logic rstn_100M;
21
- axi_stream_inf #(.DSIZE(16),.FreqM(100),.USIZE(1)) x_origin_inf (.aclk(clock_100M),.aresetn(rstn_100M),.aclken(1'b1)) ;
22
- //==========================================================================
23
- //-------- instance --------------------------------------------------------
24
- simple_clock simple_clock_inst(
25
- /* input clock */.sys_clk (global_sys_clk ),
26
- /* output clock */.clock (clock_100M ),
27
- /* output reset */.rst_n (rstn_100M )
28
- );
29
- a_test_md a_test_md_inst(
30
- /* input clock */.clock (clock_100M ),
31
- /* input reset */.rst (~rstn_100M ),
32
- /* axi_stream_inf.master */.origin_inf (x_origin_inf )
33
- );
34
- //==========================================================================
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;
39
1
 
2
+ `timescale 1ns/1ps
3
+ module test_tttop();
4
+ initial begin
5
+ #(1us);
6
+ $warning("Check TopModule.sim,please!!!");
7
+ $stop;
8
+ end
40
9
  endmodule
@@ -1,9 +1,40 @@
1
-
1
+ /**********************************************
2
+ _______________________________________
3
+ ___________ Cook Darwin __________
4
+ _______________________________________
5
+ descript:
6
+ author : Cook.Darwin
7
+ Version: VERA.0.0
8
+ created: 2023-08-16 21:22:16 +0800
9
+ madified:
10
+ ***********************************************/
2
11
  `timescale 1ns/1ps
3
- module test_tttop_sim();
4
- initial begin
5
- #(1us);
6
- $warning("Check TopModule.sim,please!!!");
7
- $stop;
8
- end
12
+
13
+ module test_tttop_sim (
14
+ input global_sys_clk
15
+ );
16
+
17
+ //==========================================================================
18
+ //-------- define ----------------------------------------------------------
19
+ logic clock_100M;
20
+ logic rstn_100M;
21
+ axi_stream_inf #(.DSIZE(16),.FreqM(100),.USIZE(1)) x_origin_inf (.aclk(clock_100M),.aresetn(rstn_100M),.aclken(1'b1)) ;
22
+ //==========================================================================
23
+ //-------- instance --------------------------------------------------------
24
+ simple_clock simple_clock_inst(
25
+ /* input clock */.sys_clk (global_sys_clk ),
26
+ /* output clock */.clock (clock_100M ),
27
+ /* output reset */.rst_n (rstn_100M )
28
+ );
29
+ a_test_md a_test_md_inst(
30
+ /* input clock */.clock (clock_100M ),
31
+ /* input reset */.rst (~rstn_100M ),
32
+ /* axi_stream_inf.master */.origin_inf (x_origin_inf )
33
+ );
34
+ //==========================================================================
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;
39
+
9
40
  endmodule
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.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cook.Darwin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-18 00:00:00.000000000 Z
11
+ date: 2023-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -310,6 +310,7 @@ files:
310
310
  - lib/axi/AXI_stream/gen_origin_axis.sv
311
311
  - lib/axi/AXI_stream/gen_origin_axis_A1.sv
312
312
  - lib/axi/AXI_stream/gen_origin_axis_A2.sv
313
+ - lib/axi/AXI_stream/gen_origin_axis_A3.sv
313
314
  - lib/axi/AXI_stream/gen_simple_axis.sv
314
315
  - lib/axi/AXI_stream/packet_fifo/axi_stream_long_fifo.sv
315
316
  - lib/axi/AXI_stream/packet_fifo/axi_stream_long_fifo_verb.sv