w11 - vhd 0.794
W11 CPU core and support modules
Loading...
Searching...
No Matches
tst_sram.vhd
Go to the documentation of this file.
1-- $Id: tst_sram.vhd 1181 2019-07-08 17:00:50Z mueller $
2-- SPDX-License-Identifier: GPL-3.0-or-later
3-- Copyright 2007-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4--
5------------------------------------------------------------------------------
6-- Module Name: tst_sram - syn
7-- Description: test of sram (s3,c7) and cram (n2,n3,n4) and its controller
8--
9-- Dependencies: vlib/memlib/ram_1swsr_wfirst_gen
10-- vlib/memlib/ram_2swsr_wfirst_gen
11--
12-- Test bench: arty/tb/tb_tst_sram_arty (with ddr3 via mig)
13-- nexys4d/tb/tb_tst_mig_n4d (with ddr2 via mig)
14-- cmoda7/tb/tb_tst_sram_c7 (with sram)
15-- nexys4/tb/tb_tst_sram_n4 (with cram)
16-- nexys3/tb/tb_tst_sram_n3 (with cram)
17-- nexys2/tb/tb_tst_sram_n2 (with cram)
18-- s3board/tb/tb_tst_sram_s3 (with sram)
19--
20-- Target Devices: generic
21-- Tool versions: xst 8.2-14.7; viv 2014.4-2018.3; ghdl 0.18-0.35
22--
23-- Revision History:
24-- Date Rev Version Comment
25-- 2019-03-02 1116 1.6.1 define init_rbf_*
26-- 2017-06-25 917 1.6 allow AWIDTH=17; sstat_rbf_awidth instead of _wide
27-- 2016-07-10 785 1.5.1 std SWI layout: now (7:4) disp select, SWI(1)->XON
28-- 2016-07-09 784 1.5 AWIDTH generic, add 22bit support for cram
29-- 2016-05-22 767 1.4.1 don't init N_REGS (vivado fix for fsm inference)
30-- 2014-09-05 591 1.4 use new rlink v4 iface and 4 bit STAT
31-- 2014-08-15 583 1.3 rb_mreq addr now 16 bit
32-- 2011-11-21 432 1.2.0 now numeric_std clean
33-- 2010-12-31 352 1.2 port to rbv3
34-- 2010-10-23 335 1.1.3 rename RRI_LAM->RB_LAM;
35-- 2010-06-18 306 1.1.2 rename rbus data fields to _rbf_
36-- 2010-06-03 299 1.1.1 correct rbus init logic (use we, RB_ADDR)
37-- 2010-05-24 294 1.1 Correct _al->_dl logic, remove BUSY=0 condition
38-- 2010-05-21 292 1.0.1 move memory controller to top level entity
39-- 2010-05-16 291 1.0 Initial version (extracted from sys_tst_sram)
40-- now RB_SRES only driven when selected
41------------------------------------------------------------------------------
42--
43-- rbus registers:
44--
45-- Address Bits Name r/w/f Function
46-- bbb00000 15:00 mdih r/w/- Memory data input register, high word
47-- bbb00001 15:00 mdil r/w/- Memory data input register, low word
48-- bbb00010 15:00 mdoh r/-/- Memory data output register, high word
49-- bbb00011 15:00 mdol r/-/- Memory data output register, low word
50-- bbb00100 01:00 maddrh r/w/- Memory address register, high word
51-- bbb00101 15:00 maddrl r/w/- Memory address register, low word
52--
53-- bbb00110 mcmd -/-/f Immediate memory command register
54-- 14 ld -/-/f if 1 load addrh field to maddr high word
55-- 13 inc -/-/f if 1 post-increment maddr
56-- 12 we -/-/f if 1 do write cycle, otherwise read
57-- 11:08 be -/-/f byte enables (used for writes)
58-- *:00 addrh -/-/f maddr high word (loaded of ld=1)
59--
60-- bbb00111 15:00 mblk r/w/- Memory block read/write
61-- pairs of r/w to access memory directly
62-- read access logic:
63-- than mdo is read from mem(maddr)
64-- 1st read gives mdoh, 2nd loads mdol
65-- maddr is post-incrememted
66-- write access logic:
67-- 1st write loads mdih, 2nd loads mdil
68-- than mdi is written to mem(maddr)
69-- maddr is post-incrememted
70--
71-- bbb01000 10:00 slim r/w/- Sequencer range register
72-- bbb01001 10:00 saddr r/w/- Sequencer address register
73-- bbb01010 15:00 sblk r/w/- Sequencer memory block read/write
74-- groups of 4 r/w to access sequencer mem
75-- access order: 11,10,01,00
76-- bbb01011 15:00 sblkc r/w/- Like sblk, access to command part
77-- groups of 2 r/w to access sequencer mem
78-- access order: 11,10
79-- bbb01100 15:00 sblkd r/w/- Like sblk, access to data part
80-- groups of 2 r/w to access sequencer mem
81-- access order: 01,00
82-- bbb01101 sstat r/w/- Sequencer status register
83-- 15 wide r/-/- 1 if AWIDTH=22
84-- 09 wswap r/w/- enable swap of upper 4 addr bits
85-- 08 wloop r/w/- enable wide (22bit) loop (default 18bit)
86-- 07 loop r/w/- loop till maddr=<all-ones>
87-- 06 xord r/w/- xor memory address with maddr
88-- 05 xora r/w/- xor memory data with mdi
89-- 04 veri r/w/- verify memory reads
90-- 01 fail r/-/- 1 if sequencer stopped after failure
91-- 00 run r/-/- 1 if sequencer running
92-- bbb01110 sstart -/-/f Start sequencer (sstat.run=1, .fail=0)
93-- bbb01111 sstop -/-/f Stop sequencer (sstat.run=0)
94-- bbb10000 10:00 seaddr r/-/- Current sequencer address
95-- bbb10001 15:00 sedath r/-/- Current sequencer data (high word)
96-- bbb10010 15:00 sedatl r/-/- Current sequencer data ( low word)
97--
98-- Sequencer memory format
99-- 64 bit wide, upper 32 bits sequencer command, lower 32 bits data
100-- Item Bits Name Function
101-- scmd 31:28 wait number of wait cycles
102-- 24 we write enable
103-- 23:20 be byte enables
104-- 17:00 addr address
105--
106------------------------------------------------------------------------------
107--
108-- Usage of S3BOARD Switches, Buttons, LEDs:
109--
110-- BTN(3:0): unused
111--
112-- SWI(7:4): determine data displayed
113-- SWI 3210
114-- 0000 mdil
115-- 0001 mdih
116-- 0010 mem_do.l
117-- 0011 mem_do.h
118-- 0100 maddr.l
119-- 0101 maddr.h
120-- 0110 slim
121-- 0111 saddr
122-- 1000 sstat
123-- 1001 seaddr
124-- 1010 sedatl
125-- 1011 sedath
126-- 1100 smem_b0 data.l
127-- 1101 smem_b1 data.h
128-- 1110 smem_b2 cmd.l
129-- 1111 smem_b3 cmd.h
130-- SWI(3:2): unused
131-- SWI(1): 1 enable XON
132-- SWI(0): RS232 port select (on some boards)
133--
134-- LED(7): or of all unused BTNs and SWI
135-- LED(6): R_REGS.sloop
136-- LED(5): R_REGS.sveri
137-- LED(4): R_REGS.sfail
138-- LED(3): R_REGS.srun
139-- LED(2): MEM_ACT_W
140-- LED(1): MEM_ACT_R
141-- LED(0): MEM_BUSY
142--
143-- DSP: data as selected by SWI(7..4)
144--
145-- DP(3): not SER_MONI.txok (shows tx back pressure)
146-- DP(2): SER_MONI.txact (shows tx activity)
147-- DP(1): not SER_MONI.rxok (shows rx back pressure)
148-- DP(0): SER_MONI.rxact (shows rx activity)
149--
150
151-- ----------------------------------------------------------------------------
152
153library ieee;
154use ieee.std_logic_1164.all;
155use ieee.numeric_std.all;
156
157use work.slvtypes.all;
158use work.rutil.all;
159use work.memlib.all;
160use work.rblib.all;
161
162-- ----------------------------------------------------------------------------
163
164entity tst_sram is -- tester for sram memctl
165 generic (
166 RB_ADDR : slv16 := slv(to_unsigned(2#0000000000000000#,16));
167 AWIDTH : natural := 18);
168 port (
169 CLK : in slbit; -- clock
170 RESET : in slbit; -- reset
171 RB_MREQ : in rb_mreq_type; -- rbus: request
172 RB_SRES : out rb_sres_type; -- rbus: response
173 RB_STAT : out slv4; -- rbus: status flags
174 RB_LAM : out slbit; -- remote attention
175 SWI : in slv8; -- hio switches
176 BTN : in slv4; -- hio buttons
177 LED : out slv8; -- hio leds
178 DSP_DAT : out slv16; -- hio display data
179 MEM_RESET : out slbit; -- mem: reset
180 MEM_REQ : out slbit; -- mem: request
181 MEM_WE : out slbit; -- mem: write enable
182 MEM_BUSY : in slbit; -- mem: controller busy
183 MEM_ACK_R : in slbit; -- mem: acknowledge read
184 MEM_ACK_W : in slbit; -- mem: acknowledge write
185 MEM_ACT_R : in slbit; -- mem: signal active read
186 MEM_ACT_W : in slbit; -- mem: signal active write
187 MEM_ADDR : out slv(AWIDTH-1 downto 0); -- mem: address
188 MEM_BE : out slv4; -- mem: byte enable
189 MEM_DI : out slv32; -- mem: data in (memory view)
190 MEM_DO : in slv32 -- mem: data out (memory view)
191 );
192end tst_sram;
193
194architecture syn of tst_sram is
195
196 constant IWIDTH : natural := imin(18, AWIDTH);
197
198 signal SEQ_RESET : slbit := '0';
199
200 signal SMEM_CEA : slbit := '0';
201 signal SMEM_B3_WE : slbit := '0';
202 signal SMEM_B2_WE : slbit := '0';
203 signal SMEM_B1_WE : slbit := '0';
204 signal SMEM_B0_WE : slbit := '0';
205 signal SMEM_WEB : slbit := '0';
206 signal SMEM_CMD : slv32 := (others=>'0');
207 signal SMEM_DATA : slv32 := (others=>'0');
208
209 type state_type is (
210 s_idle, -- s_idle: wait for input
211 s_mcmd, -- s_mcmd: immediate memory r/w
212 s_mcmd_read, -- s_mcmd_read: wait for read completion
213 s_mblk_wr1, -- s_mblk_wr1: mem blk write, get datal
214 s_mblk_wr2, -- s_mblk_wr2: mem blk write, do write
215 s_mblk_rd1, -- s_mblk_rd1: mem blk read, wait, datah
216 s_mblk_rd2, -- s_mblk_rd2: mem blk read, datal
217 s_sblk_rd, -- s_sblk_rd: read smem for sblk
218 s_sblk, -- s_sblk: process sblk transfers
219 s_sstart, -- s_sstart: sequencer startup
220 s_sload, -- s_sload: sequencer load data
221 s_srun, -- s_srun: run sequencer commands
222 s_sloop -- s_sloop: stop or loop
223 );
224
225 type regs_type is record
226 state : state_type; -- state
227 rbsel : slbit; -- rbus select
228 maddr : slv(AWIDTH-1 downto 0); -- memory address
229 mdi : slv32; -- memory data input
230 saddr : slv11; -- sequencer address
231 slim : slv11; -- sequencer range
232 sbank : slv2; -- current sblk bank
233 srun : slbit; -- seq: run flag
234 slast : slbit; -- seq: last cmd flag
235 sfail : slbit; -- seq: fail flag
236 swcnt : slv4; -- seq: wait counter
237 scaddr : slv11; -- seq: current address
238 sveri : slbit; -- seq: verify mode (check data)
239 sxora : slbit; -- seq: xor maddr into address
240 sxord : slbit; -- seq: xor mdi into data
241 sloop : slbit; -- seq: loop over maddr
242 swloop : slbit; -- seq: enable wide loop (22bit)
243 swswap : slbit; -- seq: enable top 4 bit addr swap
244 mrp_val_al : slbit; -- mrp: valid flag, addr latch stage
245 mrp_adr_al : slv11; -- mrp: seq address, addr latch stage
246 mrp_dat_al : slv32; -- mrp: exp mem data, addr latch stage
247 mrp_val_dl : slbit; -- mrp: valid flag, data latch stage
248 mrp_adr_dl : slv11; -- mrp: seq address, data latch stage
249 mrp_dat_dl : slv32; -- mrp: exp mem data, data latch stage
250 se_addr : slv11; -- seq err: seq address
251 se_data : slv32; -- seq err: memory data
252 dispval : slv16; -- data for display
253 end record regs_type;
254
255 constant maddrzero : slv(AWIDTH-1 downto 0) := (others=>'0');
256
257 constant regs_init : regs_type := (
258 s_idle, -- state
259 '0', -- rbsel
260 maddrzero, -- maddr
261 (others=>'0'), -- mdi
262 (others=>'0'), -- saddr
263 (others=>'0'), -- slim
264 (others=>'0'), -- sbank
265 '0','0','0', -- srun, slast, sfail
266 (others=>'0'), -- swcnt
267 (others=>'0'), -- scaddr
268 '0','0','0', -- sveri,sxora,sxord
269 '0','0','0', -- sloop,swloop,swswap
270 '0', -- mrp_val_al
271 (others=>'0'), -- mrp_adr_al
272 (others=>'0'), -- mrp_dat_al
273 '0', -- mrp_val_dl
274 (others=>'0'), -- mrp_adr_dl
275 (others=>'0'), -- mrp_dat_dl
276 (others=>'0'), -- se_addr
277 (others=>'0'), -- se_data
278 (others=>'0') -- dispval
279 );
280
282 signal N_REGS : regs_type; -- don't init (vivado fix for fsm infer)
283
284 subtype maddr_f_wh is integer range AWIDTH-1 downto 16;
285 subtype maddr_f_wl is integer range 15 downto 0;
286
287 subtype maddr_f_scmd is integer range IWIDTH-1 downto 0;
288 subtype maddr_f_top4 is integer range AWIDTH-1 downto AWIDTH-1-3;
289 subtype maddr_f_mid4 is integer range AWIDTH-1-4 downto AWIDTH-1-7;
290 subtype maddr_f_bot is integer range AWIDTH-1-8 downto 0;
291
292 subtype df_word0 is integer range 15 downto 0;
293 subtype df_word1 is integer range 31 downto 16;
294
295 constant init_rbf_seq: integer := 0;
296 constant init_rbf_mem: integer := 1;
297
298 subtype maddrh_rbf_h is integer range AWIDTH-1-16 downto 0;
299
300 constant mcmd_rbf_ld: integer := 14;
301 constant mcmd_rbf_inc: integer := 13;
302 constant mcmd_rbf_we: integer := 12;
303 subtype mcmd_rbf_be is integer range 11 downto 8;
304 subtype mcmd_rbf_addrh is integer range AWIDTH-1-16 downto 0;
305
306 subtype sstat_rbf_awidth is integer range 15 downto 13;
307 constant sstat_rbf_wswap: integer := 9;
308 constant sstat_rbf_wloop: integer := 8;
309 constant sstat_rbf_loop: integer := 7;
310 constant sstat_rbf_xord: integer := 6;
311 constant sstat_rbf_xora: integer := 5;
312 constant sstat_rbf_veri: integer := 4;
313 constant sstat_rbf_fail: integer := 1;
314 constant sstat_rbf_run: integer := 0;
315
316 subtype scmd_rbf_wait is integer range 31 downto 28;
317 constant scmd_rbf_we: integer := 24;
318 subtype scmd_rbf_be is integer range 23 downto 20;
319 subtype scmd_rbf_addr is integer range IWIDTH-1 downto 0;
320
321 constant rbaddr_mdih: slv5 := "00000"; -- 0 -/r/w
322 constant rbaddr_mdil: slv5 := "00001"; -- 1 -/r/w
323 constant rbaddr_mdoh: slv5 := "00010"; -- 2 -/r/-
324 constant rbaddr_mdol: slv5 := "00011"; -- 3 -/r/-
325 constant rbaddr_maddrh: slv5 := "00100"; -- 4 -/r/w
326 constant rbaddr_maddrl: slv5 := "00101"; -- 5 -/r/w
327 constant rbaddr_mcmd: slv5 := "00110"; -- 6 -/-/w
328 constant rbaddr_mblk: slv5 := "00111"; -- 7 -/r/w
329 constant rbaddr_slim: slv5 := "01000"; -- 8 -/r/w
330 constant rbaddr_saddr: slv5 := "01001"; -- 9 -/r/w
331 constant rbaddr_sblk: slv5 := "01010"; -- 10 -/r/w
332 constant rbaddr_sblkc: slv5 := "01011"; -- 11 -/r/w
333 constant rbaddr_sblkd: slv5 := "01100"; -- 12 -/r/w
334 constant rbaddr_sstat: slv5 := "01101"; -- 13 -/r/w
335 constant rbaddr_sstart: slv5 := "01110"; -- 14 f/-/-
336 constant rbaddr_sstop: slv5 := "01111"; -- 15 f/-/-
337 constant rbaddr_seaddr: slv5 := "10000"; -- 16 -/r/-
338 constant rbaddr_sedath: slv5 := "10001"; -- 17 -/r/-
339 constant rbaddr_sedatl: slv5 := "10010"; -- 18 -/r/-
340
341 constant omux_mdil: slv4 := "0000";
342 constant omux_mdih: slv4 := "0001";
343 constant omux_memdol: slv4 := "0010";
344 constant omux_memdoh: slv4 := "0011";
345 constant omux_maddrl: slv4 := "0100";
346 constant omux_maddrh: slv4 := "0101";
347 constant omux_slim: slv4 := "0110";
348 constant omux_saddr: slv4 := "0111";
349 constant omux_sstat: slv4 := "1000";
350 constant omux_seaddr: slv4 := "1001";
351 constant omux_sedatl: slv4 := "1010";
352 constant omux_sedath: slv4 := "1011";
353 constant omux_smemb0: slv4 := "1100";
354 constant omux_smemb1: slv4 := "1101";
355 constant omux_smemb2: slv4 := "1110";
356 constant omux_smemb3: slv4 := "1111";
357
358begin
359
360 assert AWIDTH=17 or AWIDTH=18 or AWIDTH=22
361 report "assert(AWIDTH=17 or AWIDTH=18 or AWIDTH=22): unsupported AWIDTH"
362 severity failure;
363
364 SMEM_B3 : ram_1swsr_wfirst_gen
365 generic map (
366 AWIDTH => 11,
367 DWIDTH => 16)
368 port map (
369 CLK => CLK,
370 EN => SMEM_CEA,
371 WE => SMEM_B3_WE,
372 ADDR => R_REGS.saddr,
373 DI => RB_MREQ.din,
375 );
376
377 SMEM_B2 : ram_1swsr_wfirst_gen
378 generic map (
379 AWIDTH => 11,
380 DWIDTH => 16)
381 port map (
382 CLK => CLK,
383 EN => SMEM_CEA,
384 WE => SMEM_B2_WE,
385 ADDR => R_REGS.saddr,
386 DI => RB_MREQ.din,
388 );
389
390 SMEM_B1 : ram_2swsr_wfirst_gen
391 generic map (
392 AWIDTH => 11,
393 DWIDTH => 16)
394 port map (
395 CLKA => CLK,
396 CLKB => CLK,
397 ENA => SMEM_CEA,
398 ENB => SMEM_WEB,
399 WEA => SMEM_B1_WE,
400 WEB => SMEM_WEB,
401 ADDRA => R_REGS.saddr,
402 ADDRB => R_REGS.mrp_adr_dl,
403 DIA => RB_MREQ.din,
404 DIB => MEM_DO(df_word1),
406 DOB => open
407 );
408
409 SMEM_B0 : ram_2swsr_wfirst_gen
410 generic map (
411 AWIDTH => 11,
412 DWIDTH => 16)
413 port map (
414 CLKA => CLK,
415 CLKB => CLK,
416 ENA => SMEM_CEA,
417 ENB => SMEM_WEB,
418 WEA => SMEM_B0_WE,
419 WEB => SMEM_WEB,
420 ADDRA => R_REGS.saddr,
421 ADDRB => R_REGS.mrp_adr_dl,
422 DIA => RB_MREQ.din,
423 DIB => MEM_DO(df_word0),
425 DOB => open
426 );
427
428 -- look for init's against the rbus base address
429 -- generate subsystem resets depending in data bits
430 proc_reset: process (RESET, RB_MREQ)
431 begin
432
433 SEQ_RESET <= RESET;
434 MEM_RESET <= RESET;
435
436 if RB_MREQ.init='1' and RB_MREQ.addr=RB_ADDR then
439 end if;
440
441 end process proc_reset;
442
443 proc_regs: process (CLK)
444 begin
445
446 if rising_edge(CLK) then
447 if SEQ_RESET = '1' then
448 R_REGS <= regs_init;
449 else
450 R_REGS <= N_REGS;
451 end if;
452 end if;
453
454 end process proc_regs;
455
456 proc_next: process (R_REGS, RB_MREQ,
459 SWI)
460
461 variable r : regs_type := regs_init;
462 variable n : regs_type := regs_init;
463
464 variable irb_ack : slbit := '0';
465 variable irb_busy : slbit := '0';
466 variable irb_err : slbit := '0';
467 variable irb_dout : slv16 := (others=>'0');
468 variable irbena : slbit := '0'; -- re or we -> rbus request
469 variable irbact : slbit := '0'; -- sel and (re or we) -> device active
470
471 variable imem_reqr : slbit := '0';
472 variable imem_reqw : slbit := '0';
473 variable imem_be : slv4 := (others=>'0');
474 variable imem_addr : slv(AWIDTH-1 downto 0) := (others=>'0');
475 variable imem_di : slv32 := (others=>'0');
476
477 variable ixor_addr : slv(AWIDTH-1 downto 0) := (others=>'0');
478 variable ixor_data : slv32 := (others=>'0');
479 variable imaddr_chk: slv(AWIDTH-1 downto 0) := (others=>'0');
480
481 variable isblk_ok : slbit := '0';
482 variable isbank : slv2 := "11";
483
484 variable maddr_inc : slbit := '0';
485 variable saddr_inc : slbit := '0';
486 variable saddr_next : slbit := '0';
487 variable saddr_last : slbit := '0';
488 variable swcnt_inc : slbit := '0';
489
490 variable ilam : slbit := '0';
491
492 variable omux_sel : slv4 := "0000";
493 variable omux_dat : slv16 := (others=>'0');
494
495 constant c_maddr_ones: slv(AWIDTH-1 downto 0) := (others=>'1');
496
497 begin
498
499 r := R_REGS;
500 n := R_REGS;
501
502 irb_ack := '0';
503 irb_busy := '0';
504 irb_err := '0';
505 irb_dout := (others=>'0');
506
507 irbena := RB_MREQ.re or RB_MREQ.we;
508 irbact := '0';
509
510 imem_reqr := '0';
511 imem_reqw := '0';
512 imem_be := (others=>'1');
513 imem_addr := r.maddr;
514 imem_di := r.mdi;
515
516 ixor_addr := (others=>'0');
517 ixor_data := (others=>'0');
518
519 isblk_ok := '0';
520 isbank := "11";
521
522 maddr_inc := '0';
523 saddr_inc := '0';
524 saddr_next := '0';
525 saddr_last := '0';
526 swcnt_inc := '0';
527
528 ilam := '0';
529
530 omux_sel := omux_mdil;
531 omux_dat := (others=>'0');
532
533 SMEM_CEA <= '0';
534 SMEM_B3_WE <= '0';
535 SMEM_B2_WE <= '0';
536 SMEM_B1_WE <= '0';
537 SMEM_B0_WE <= '0';
538 SMEM_WEB <= '0';
539
540 if r.saddr = r.slim then
541 saddr_last := '1';
542 end if;
543
544 if r.mrp_val_dl='1' and MEM_ACK_R='1' then
545 n.mrp_val_dl := '0';
546 if r.sveri = '1' then
547 if r.mrp_dat_dl /= MEM_DO and -- mismatch
548 r.sfail='0' then -- and no fail set yet
549 ilam := '1';
550 n.sfail := '1';
551 n.srun := '0';
552 n.se_addr := r.mrp_adr_dl;
553 n.se_data := MEM_DO;
554 end if;
555 else
556 SMEM_WEB <= '1';
557 end if;
558 end if;
559 if r.mrp_val_al='1' and MEM_ACT_R='1' then
560 n.mrp_val_al := '0';
561 n.mrp_val_dl := r.mrp_val_al;
562 n.mrp_adr_dl := r.mrp_adr_al;
563 n.mrp_dat_dl := r.mrp_dat_al;
564 end if;
565
566 -- rbus address decoder
567 n.rbsel := '0';
568 if RB_MREQ.aval='1' and RB_MREQ.addr(15 downto 5)=RB_ADDR(15 downto 5) then
569 n.rbsel := '1';
570 end if;
571
572 if r.rbsel='1' and irbena='1' then
573 irb_ack := '1'; -- ack all (maybe rejected later)
574 irbact := '1'; -- signal device active
575 end if;
576
577 case r.state is
578
579 when s_idle => -- s_idle: wait for rbus requests ----
580
581 if r.rbsel = '1' then -- rbus select
582
583 case RB_MREQ.addr(4 downto 0) is -- rbus address decoder
584
585 when rbaddr_mdih =>
586 omux_sel := omux_mdih;
587 if RB_MREQ.we = '1' then
588 n.mdi(df_word1) := RB_MREQ.din;
589 end if;
590
591 when rbaddr_mdil =>
592 omux_sel := omux_mdil;
593 if RB_MREQ.we = '1' then
594 n.mdi(df_word0) := RB_MREQ.din;
595 end if;
596
597 when rbaddr_mdoh =>
598 omux_sel := omux_memdoh;
599 if RB_MREQ.we = '1' then
600 irb_err := '1'; -- read-only reg
601 end if;
602
603 when rbaddr_mdol =>
604 omux_sel := omux_memdol;
605 if RB_MREQ.we = '1' then
606 irb_err := '1'; -- read-only reg
607 end if;
608
609 when rbaddr_maddrh =>
610 omux_sel := omux_maddrh;
611 if RB_MREQ.we = '1' then
612 n.maddr(maddr_f_wh) := RB_MREQ.din(maddrh_rbf_h);
613 end if;
614
615 when rbaddr_maddrl =>
616 omux_sel := omux_maddrl;
617 if RB_MREQ.we = '1' then
618 n.maddr(maddr_f_wl) := RB_MREQ.din;
619 end if;
620
621 when rbaddr_mcmd =>
622 if RB_MREQ.we = '1' then
623 if RB_MREQ.din(mcmd_rbf_ld) = '1' then
624 n.maddr(maddr_f_wh) := RB_MREQ.din(mcmd_rbf_addrh);
625 end if;
626 irb_busy := '1';
627 n.state := s_mcmd;
628 end if;
629 if RB_MREQ.re = '1' then
630 irb_err := '1'; -- write-only reg
631 end if;
632
633 when rbaddr_mblk =>
634 imem_addr := r.maddr;
635
636 if RB_MREQ.we = '1' then
637 n.mdi(df_word1) := RB_MREQ.din;
638 n.state := s_mblk_wr1;
639 end if;
640 if RB_MREQ.re = '1' then
641 irb_busy := '1';
642 imem_reqr := '1';
643 if MEM_BUSY = '0' then
644 maddr_inc := '1';
645 n.state := s_mblk_rd1;
646 end if;
647 end if;
648
649 when rbaddr_slim =>
650 omux_sel := omux_slim;
651 if RB_MREQ.we = '1' then
652 n.slim := RB_MREQ.din(r.slim'range);
653 end if;
654
655 when rbaddr_saddr =>
656 omux_sel := omux_saddr;
657 if RB_MREQ.we = '1' then
658 n.saddr := RB_MREQ.din(r.saddr'range);
659 end if;
660
662 if RB_MREQ.we = '1' then
663 n.sbank := "11";
664 irb_busy := '1';
665 n.state := s_sblk;
666 end if;
667 if RB_MREQ.re = '1' then
668 n.sbank := "11";
669 irb_busy := '1';
670 n.state := s_sblk_rd;
671 end if;
672
673 when rbaddr_sstat =>
674 omux_sel := omux_sstat;
675 if RB_MREQ.we = '1' then
676 n.swswap := RB_MREQ.din(sstat_rbf_wswap);
677 n.swloop := RB_MREQ.din(sstat_rbf_wloop);
678 n.sloop := RB_MREQ.din(sstat_rbf_loop);
679 n.sxord := RB_MREQ.din(sstat_rbf_xord);
680 n.sxora := RB_MREQ.din(sstat_rbf_xora);
681 n.sveri := RB_MREQ.din(sstat_rbf_veri);
682 end if;
683
684 when rbaddr_sstart =>
685 if RB_MREQ.we = '1' then
686 n.sfail := '0';
687 n.state := s_sstart;
688 end if;
689 if RB_MREQ.re = '1' then
690 irb_err := '1'; -- write-only reg
691 end if;
692
693 when rbaddr_sstop =>
694 if RB_MREQ.we = '1' then
695 n.srun := '0';
696 end if;
697 if RB_MREQ.re = '1' then
698 irb_err := '1'; -- write-only reg
699 end if;
700
701 when rbaddr_seaddr =>
702 omux_sel := omux_seaddr;
703 if RB_MREQ.we = '1' then
704 irb_err := '1'; -- read-only reg
705 end if;
706
707 when rbaddr_sedath =>
708 omux_sel := omux_sedath;
709 if RB_MREQ.we = '1' then
710 irb_err := '1'; -- read-only reg
711 end if;
712
713 when rbaddr_sedatl =>
714 omux_sel := omux_sedatl;
715 if RB_MREQ.we = '1' then
716 irb_err := '1'; -- read-only reg
717 end if;
718
719 when others =>
720 irb_ack := '0'; -- refuse ack in case of bad addr
721 end case;
722
723 else -- no rbus request (rb_mreq.ack='0')
724
725 if r.srun = '1' then
726 n.state := s_srun;
727 end if;
728
729 end if;
730
731 when s_mcmd=> -- s_mcmd: immediate memory r/w ------
732 if RB_MREQ.din(mcmd_rbf_we) = '1' then -- write command
733 imem_reqw := '1';
734 else -- read command
735 imem_reqr := '1';
736 end if;
737 imem_be := RB_MREQ.din(mcmd_rbf_be);
738 imem_addr := r.maddr;
739 imem_di := r.mdi;
740
741 if irbact = '0' then -- rbus cycle abort
742 n.state := s_idle; -- quit
743 else
744 if MEM_BUSY = '0' then -- command accepted ?
745 if RB_MREQ.din(mcmd_rbf_inc) = '1' then -- maddr inc requested
746 maddr_inc := '1';
747 end if;
748 if RB_MREQ.din(mcmd_rbf_we) = '1' then -- write command
749 n.state := s_idle;
750 else -- read command
751 irb_busy := '1';
752 n.state := s_mcmd_read;
753 end if;
754 else -- otherwise
755 irb_busy := '1'; -- hold and wait
756 end if;
757 end if;
758
759 when s_mcmd_read => -- s_mcmd_read: wait for read completion
760
761 if irbact = '0' then -- rbus cycle abort
762 n.state := s_idle; -- quit
763 else
764 if MEM_ACK_R = '1' then -- read acknowledge seen
765 n.state := s_idle;
766 else -- otherwise
767 irb_busy := '1'; -- hold and wait
768 end if;
769 end if;
770
771 when s_mblk_wr1 => -- s_mblk_wr1: mem blk write, get datal
772 if irbact = '1' then -- wait for rbus request
773 if RB_MREQ.we = '1' and -- write access and cmd ok ?
774 RB_MREQ.addr(4 downto 0)=rbaddr_mblk then
775 n.mdi(df_word0) := RB_MREQ.din; -- latch datal
776 irb_busy := '1';
777 n.state := s_mblk_wr2; -- next: issue mem write
778 else
779 irb_err := '1'; -- signal error
780 n.state := s_idle; -- return to dispatch
781 end if;
782 end if;
783
784 when s_mblk_wr2 => -- s_mblk_wr2: mem blk write, do write
785 n.state := s_mblk_wr2; -- needed to prevent vivado iSTATE
786 imem_reqw := '1';
787 imem_be := (others=>'1');
788 imem_addr := r.maddr;
789 imem_di := r.mdi;
790
791 if irbact = '0' then -- rbus cycle abort
792 n.state := s_idle; -- quit
793 else
794 if MEM_BUSY = '0' then -- command accepted ?
795 maddr_inc := '1';
796 n.state := s_idle;
797 else -- otherwise
798 irb_busy := '1'; -- hold and wait
799 end if;
800 end if;
801
802 when s_mblk_rd1 => -- s_mblk_rd1: mem blk read, wait, datah
803 omux_sel := omux_memdoh; -- return mem datah
804 if irbact = '0' then -- rbus cycle abort
805 n.state := s_idle; -- quit
806 else
807 if MEM_ACK_R = '1' then -- read acknowledge seen
808 n.state := s_mblk_rd2;
809 else -- otherwise
810 irb_busy := '1'; -- hold and wait
811 end if;
812 end if;
813
814 when s_mblk_rd2 => -- s_mblk_rd2: mem blk read, datal ---
815 omux_sel := omux_memdol; -- return mem datal
816 if irbact = '1' then -- wait for rbus request
817 if RB_MREQ.re = '1' and -- read access and cmd ok ?
818 RB_MREQ.addr(4 downto 0)=rbaddr_mblk then
819 n.state := s_idle;
820 else -- write if unexpected cmd addr
821 irb_err := '1'; -- signal error
822 n.state := s_idle; -- return to dispatch
823 end if;
824 end if;
825
826 when s_sblk_rd => -- s_sblk_rd: read smem for sblk -----
827 if irbact = '0' then -- rbus cycle abort
828 n.state := s_idle; -- quit
829 else
830 irb_busy := '1';
831 SMEM_CEA <= '1';
832 n.state := s_sblk;
833 end if;
834
835 when s_sblk => -- s_sblk: process sblk transfers ----
836
837 isblk_ok := irbact;
838
839 case RB_MREQ.addr(4 downto 0) is
840 when rbaddr_sblk =>
841 isbank := r.sbank;
842 if r.sbank = "00" then
843 saddr_next := irbact;
844 end if;
845 when rbaddr_sblkc =>
846 isbank := '1' & r.sbank(0);
847 if r.sbank(0) = '0' then
848 saddr_next := irbact;
849 end if;
850 when rbaddr_sblkd =>
851 isbank := '0' & r.sbank(0);
852 if r.sbank(0) = '0' then
853 saddr_next := irbact;
854 end if;
855 when others =>
856 isblk_ok := '0';
857 end case;
858
859 if isblk_ok='1' and RB_MREQ.we='1' then
860 SMEM_CEA <= '1';
861 case isbank is
862 when "11" => SMEM_B3_WE <= '1';
863 when "10" => SMEM_B2_WE <= '1';
864 when "01" => SMEM_B1_WE <= '1';
865 when "00" => SMEM_B0_WE <= '1';
866 when others => null;
867 end case;
868 end if;
869
870 case isbank is
871 when "11" => omux_sel := omux_smemb3;
872 when "10" => omux_sel := omux_smemb2;
873 when "01" => omux_sel := omux_smemb1;
874 when "00" => omux_sel := omux_smemb0;
875 when others => null;
876 end case;
877
878 if isblk_ok = '1' then -- in active sblk cycle ?
879 n.sbank := slv(unsigned(r.sbank) - 1);
880 if saddr_next = '1' then
881 saddr_inc := '1';
882 if RB_MREQ.re = '1' then
883 n.state := s_sblk_rd;
884 end if;
885 end if;
886 else -- not in active sblk cycle
887 if irbact = '1' then -- if request than other address
888 irb_busy := '1'; -- hold interface and
889 n.state := s_idle; -- back to dispatcher to handle
890 end if;
891 end if;
892
893 when s_sstart => -- s_sstart: sequencer startup -------
894 irb_busy := irbact;
895 n.slast := '0';
896 n.srun := '1';
897 n.saddr := (others=>'0');
898 n.se_addr := (others=>'0');
899 n.se_data := (others=>'0');
900 n.state := s_sload;
901
902 when s_sload => -- s_sload: sequencer load data ------
903 irb_busy := irbact;
904 SMEM_CEA <= '1';
905 n.scaddr := r.saddr;
906 saddr_inc := '1';
907 if saddr_last = '1' then
908 n.slast := '1';
909 end if;
910 n.state := s_srun;
911
912 when s_srun => -- s_srun: run sequencer commands ----
913 irb_busy := irbact;
914 ixor_addr := r.maddr;
915 if r.sxora = '0' then
916 ixor_addr(maddr_f_scmd) := SMEM_CMD(scmd_rbf_addr);
917 else
918 ixor_addr(maddr_f_scmd) := SMEM_CMD(scmd_rbf_addr) xor
919 r.maddr(maddr_f_scmd);
920 end if;
921
922 if r.swswap = '1' then
923 ixor_addr := ixor_addr(maddr_f_mid4) & ixor_addr(maddr_f_top4) &
924 ixor_addr(maddr_f_bot);
925 end if;
926
927 if r.sxord = '0' then
928 ixor_data := SMEM_DATA;
929 else
930 ixor_data := SMEM_DATA xor r.mdi;
931 end if;
932 imem_addr := ixor_addr;
933 imem_be := SMEM_CMD(scmd_rbf_be);
934 imem_di := ixor_data;
935
936 if SMEM_CMD(scmd_rbf_wait) /= r.swcnt then
937 swcnt_inc := '1';
938 else
939 if SMEM_CMD(scmd_rbf_we) = '1' then
940 imem_reqw := '1';
941 else
942 imem_reqr := '1';
943 end if;
944 if MEM_BUSY = '0' then
945 if imem_reqr = '1' then
946 n.mrp_val_al := '1';
947 n.mrp_adr_al := r.scaddr;
948 n.mrp_dat_al := ixor_data;
949 end if;
950 if r.srun = '0' then
951 n.state := s_idle;
952 elsif r.slast = '1' then
953 n.state := s_sloop;
954 else
955 SMEM_CEA <= '1';
956 n.scaddr := r.saddr;
957 saddr_inc := '1';
958 if saddr_last = '1' then
959 n.slast := '1';
960 end if;
961 if irbact = '1' then -- pending rbus request ?
962 n.state := s_idle; -- than goto dispatcher
963 end if;
964 end if;
965 end if;
966 end if;
967
968 when s_sloop => -- s_sloop: stop or loop -------------
969 irb_busy := irbact;
970 imaddr_chk := r.maddr;
971 if AWIDTH = 22 and r.swloop = '0' then
972 imaddr_chk(maddr_f_top4) := (others=>'1');
973 end if;
974 if MEM_ACT_R='0' and MEM_ACK_R='0' then -- wait here till mem read done
975 if r.sfail='0' and r.sloop='1' and -- no fail and loop requested ?
976 imaddr_chk/=c_maddr_ones then -- and not wrapping
977 maddr_inc := '1'; -- increment maddr
978 n.state := s_sstart; -- and restart
979 else -- otherwise
980 ilam := not r.sfail; -- signal attention unless fail set
981 n.srun := '0'; -- stop sequencer
982 n.state := s_idle; -- goto dispatcher
983 end if;
984 end if;
985
986 when others => null;
987 end case;
988
989 if maddr_inc = '1' then
990 n.maddr := slv(unsigned(r.maddr) + 1);
991 end if;
992
993 if saddr_inc = '1' then
994 n.saddr := slv(unsigned(r.saddr) + 1);
995 end if;
996
997 if swcnt_inc = '1' then
998 n.swcnt := slv(unsigned(r.swcnt) + 1);
999 else
1000 n.swcnt := (others=>'0');
1001 end if;
1002
1003 if irbact = '0' then -- if no rbus request, use SWI for mux
1004 omux_sel := SWI(7 downto 4);
1005 end if;
1006
1007 case omux_sel is
1008 when omux_mdil =>
1009 omux_dat := r.mdi(df_word0);
1010 when omux_mdih =>
1011 omux_dat := r.mdi(df_word1);
1012 when omux_memdoh =>
1013 omux_dat := MEM_DO(df_word1);
1014 when omux_memdol =>
1015 omux_dat := MEM_DO(df_word0);
1016 when omux_maddrh =>
1017 omux_dat := (others=>'0');
1018 omux_dat(maddrh_rbf_h) := r.maddr(maddr_f_wh);
1019 when omux_maddrl =>
1020 omux_dat := r.maddr(maddr_f_wl);
1021 when omux_slim =>
1022 omux_dat := (others=>'0');
1023 omux_dat(r.slim'range) := r.slim;
1024 when omux_saddr =>
1025 omux_dat := (others=>'0');
1026 omux_dat(r.saddr'range) := r.saddr;
1027 when omux_sstat =>
1028 omux_dat := (others=>'0');
1029 omux_dat(sstat_rbf_awidth):= slv(to_unsigned(AWIDTH-16,3));
1030 omux_dat(sstat_rbf_wswap) := r.swswap;
1031 omux_dat(sstat_rbf_wloop) := r.swloop;
1032 omux_dat(sstat_rbf_loop) := r.sloop;
1033 omux_dat(sstat_rbf_xord) := r.sxord;
1034 omux_dat(sstat_rbf_xora) := r.sxora;
1035 omux_dat(sstat_rbf_veri) := r.sveri;
1036 omux_dat(sstat_rbf_fail) := r.sfail;
1037 omux_dat(sstat_rbf_run) := r.srun;
1038 when omux_seaddr =>
1039 omux_dat := (others=>'0');
1040 omux_dat(r.se_addr'range) := r.se_addr;
1041 when omux_sedath =>
1042 omux_dat := r.se_data(df_word1);
1043 when omux_sedatl =>
1044 omux_dat := r.se_data(df_word0);
1045 when omux_smemb0 =>
1046 omux_dat := SMEM_DATA(df_word0);
1047 when omux_smemb1 =>
1048 omux_dat := SMEM_DATA(df_word1);
1049 when omux_smemb2 =>
1050 omux_dat := SMEM_CMD(df_word0);
1051 when omux_smemb3 =>
1052 omux_dat := SMEM_CMD(df_word1);
1053
1054 when others => null;
1055 end case;
1056
1057 if irbact = '1' then
1058 irb_dout := omux_dat; -- if rbus request, drive dout
1059 else
1060 n.dispval := omux_dat; -- if no rbus request, display mux value
1061 end if;
1062
1063 N_REGS <= n;
1064
1065 RB_SRES <= rb_sres_init;
1066 RB_SRES.ack <= irb_ack;
1067 RB_SRES.busy <= irb_busy;
1068 RB_SRES.err <= irb_err;
1069 RB_SRES.dout <= irb_dout;
1070
1071 MEM_REQ <= imem_reqr or imem_reqw;
1072 MEM_WE <= imem_reqw;
1073 MEM_BE <= imem_be;
1074 MEM_ADDR <= imem_addr;
1075 MEM_DI <= imem_di;
1076
1077 RB_LAM <= ilam;
1078
1079 end process proc_next;
1080
1081 RB_STAT(3) <= '0';
1082 RB_STAT(2) <= '0';
1083 RB_STAT(1) <= R_REGS.sfail;
1084 RB_STAT(0) <= R_REGS.srun;
1085
1086 DSP_DAT <= R_REGS.dispval;
1087
1088 LED(0) <= MEM_BUSY;
1089 LED(1) <= MEM_ACT_R;
1090 LED(2) <= MEM_ACT_W;
1091 LED(3) <= R_REGS.srun;
1092 LED(4) <= R_REGS.sfail;
1093 LED(5) <= R_REGS.sveri;
1094 LED(6) <= R_REGS.sloop;
1095 LED(7) <= SWI(3) or SWI(2) or SWI(1) or SWI(0) or
1096 BTN(0) or BTN(1) or BTN(2) or BTN(3);
1097
1098end syn;
in ADDR slv( AWIDTH- 1 downto 0)
out DO slv( DWIDTH- 1 downto 0)
in DI slv( DWIDTH- 1 downto 0)
in DIA slv( DWIDTH- 1 downto 0)
in ADDRB slv( AWIDTH- 1 downto 0)
in ADDRA slv( AWIDTH- 1 downto 0)
out DOB slv( DWIDTH- 1 downto 0)
in DIB slv( DWIDTH- 1 downto 0)
out DOA slv( DWIDTH- 1 downto 0)
Definition: rblib.vhd:32
Definition: rutil.vhd:19
std_logic_vector( 10 downto 0) slv11
Definition: slvtypes.vhd:43
std_logic_vector( 3 downto 0) slv4
Definition: slvtypes.vhd:36
std_logic_vector( 4 downto 0) slv5
Definition: slvtypes.vhd:37
std_logic_vector( 31 downto 0) slv32
Definition: slvtypes.vhd:59
std_logic_vector( 15 downto 0) slv16
Definition: slvtypes.vhd:48
std_logic slbit
Definition: slvtypes.vhd:30
std_logic_vector( 7 downto 0) slv8
Definition: slvtypes.vhd:40
std_logic_vector( 1 downto 0) slv2
Definition: slvtypes.vhd:34
std_logic_vector slv
Definition: slvtypes.vhd:31
slv5 := "01001" rbaddr_saddr
Definition: tst_sram.vhd:330
integer := 14 mcmd_rbf_ld
Definition: tst_sram.vhd:300
integer range AWIDTH- 1- 16 downto 0 maddrh_rbf_h
Definition: tst_sram.vhd:298
slv5 := "10001" rbaddr_sedath
Definition: tst_sram.vhd:338
integer range 31 downto 16 df_word1
Definition: tst_sram.vhd:293
slbit := '0' SMEM_B1_WE
Definition: tst_sram.vhd:203
integer range IWIDTH- 1 downto 0 scmd_rbf_addr
Definition: tst_sram.vhd:319
slv5 := "00011" rbaddr_mdol
Definition: tst_sram.vhd:324
slv4 := "0011" omux_memdoh
Definition: tst_sram.vhd:344
integer range 15 downto 0 maddr_f_wl
Definition: tst_sram.vhd:285
slv5 := "01100" rbaddr_sblkd
Definition: tst_sram.vhd:333
slv5 := "10010" rbaddr_sedatl
Definition: tst_sram.vhd:339
integer range 15 downto 13 sstat_rbf_awidth
Definition: tst_sram.vhd:306
slv4 := "1110" omux_smemb2
Definition: tst_sram.vhd:355
slv4 := "1001" omux_seaddr
Definition: tst_sram.vhd:350
slv4 := "1100" omux_smemb0
Definition: tst_sram.vhd:353
integer := 5 sstat_rbf_xora
Definition: tst_sram.vhd:311
integer := 0 sstat_rbf_run
Definition: tst_sram.vhd:314
integer range 31 downto 28 scmd_rbf_wait
Definition: tst_sram.vhd:316
integer range AWIDTH- 1- 8 downto 0 maddr_f_bot
Definition: tst_sram.vhd:290
integer := 24 scmd_rbf_we
Definition: tst_sram.vhd:317
slv4 := "1011" omux_sedath
Definition: tst_sram.vhd:352
slv4 := "0100" omux_maddrl
Definition: tst_sram.vhd:345
integer := 1 sstat_rbf_fail
Definition: tst_sram.vhd:313
slv5 := "00010" rbaddr_mdoh
Definition: tst_sram.vhd:323
natural := imin( 18, AWIDTH) IWIDTH
Definition: tst_sram.vhd:196
integer range AWIDTH- 1- 16 downto 0 mcmd_rbf_addrh
Definition: tst_sram.vhd:304
slv5 := "01010" rbaddr_sblk
Definition: tst_sram.vhd:331
integer range AWIDTH- 1 downto 16 maddr_f_wh
Definition: tst_sram.vhd:284
integer := 7 sstat_rbf_loop
Definition: tst_sram.vhd:309
(s_idle,s_mcmd,s_mcmd_read,s_mblk_wr1,s_mblk_wr2,s_mblk_rd1,s_mblk_rd2,s_sblk_rd,s_sblk,s_sstart,s_sload,s_srun,s_sloop) state_type
Definition: tst_sram.vhd:209
slv32 :=( others => '0') SMEM_DATA
Definition: tst_sram.vhd:207
slv4 := "1000" omux_sstat
Definition: tst_sram.vhd:349
integer := 0 init_rbf_seq
Definition: tst_sram.vhd:295
slv5 := "01101" rbaddr_sstat
Definition: tst_sram.vhd:334
slv5 := "01111" rbaddr_sstop
Definition: tst_sram.vhd:336
integer range 11 downto 8 mcmd_rbf_be
Definition: tst_sram.vhd:303
slv5 := "00111" rbaddr_mblk
Definition: tst_sram.vhd:328
slbit := '0' SMEM_CEA
Definition: tst_sram.vhd:200
slv5 := "10000" rbaddr_seaddr
Definition: tst_sram.vhd:337
regs_type :=( s_idle, '0', maddrzero,( others => '0'),( others => '0'),( others => '0'),( others => '0'), '0', '0', '0',( others => '0'),( others => '0'), '0', '0', '0', '0', '0', '0', '0',( others => '0'),( others => '0'), '0',( others => '0'),( others => '0'),( others => '0'),( others => '0'),( others => '0')) regs_init
Definition: tst_sram.vhd:257
slv5 := "00101" rbaddr_maddrl
Definition: tst_sram.vhd:326
slv32 :=( others => '0') SMEM_CMD
Definition: tst_sram.vhd:206
integer range 23 downto 20 scmd_rbf_be
Definition: tst_sram.vhd:318
slv4 := "1010" omux_sedatl
Definition: tst_sram.vhd:351
slv5 := "00000" rbaddr_mdih
Definition: tst_sram.vhd:321
slbit := '0' SMEM_WEB
Definition: tst_sram.vhd:205
integer := 12 mcmd_rbf_we
Definition: tst_sram.vhd:302
integer := 8 sstat_rbf_wloop
Definition: tst_sram.vhd:308
slbit := '0' SMEM_B3_WE
Definition: tst_sram.vhd:201
slv5 := "00110" rbaddr_mcmd
Definition: tst_sram.vhd:327
slv5 := "01011" rbaddr_sblkc
Definition: tst_sram.vhd:332
regs_type := regs_init R_REGS
Definition: tst_sram.vhd:281
integer range 15 downto 0 df_word0
Definition: tst_sram.vhd:292
integer range IWIDTH- 1 downto 0 maddr_f_scmd
Definition: tst_sram.vhd:287
slv4 := "0111" omux_saddr
Definition: tst_sram.vhd:348
slv4 := "0010" omux_memdol
Definition: tst_sram.vhd:343
integer := 9 sstat_rbf_wswap
Definition: tst_sram.vhd:307
slv5 := "00100" rbaddr_maddrh
Definition: tst_sram.vhd:325
integer := 13 mcmd_rbf_inc
Definition: tst_sram.vhd:301
regs_type N_REGS
Definition: tst_sram.vhd:282
slv4 := "0000" omux_mdil
Definition: tst_sram.vhd:341
integer range AWIDTH- 1 downto AWIDTH- 1- 3 maddr_f_top4
Definition: tst_sram.vhd:288
integer := 6 sstat_rbf_xord
Definition: tst_sram.vhd:310
integer range AWIDTH- 1- 4 downto AWIDTH- 1- 7 maddr_f_mid4
Definition: tst_sram.vhd:289
slv4 := "0101" omux_maddrh
Definition: tst_sram.vhd:346
slv5 := "01110" rbaddr_sstart
Definition: tst_sram.vhd:335
slbit := '0' SMEM_B2_WE
Definition: tst_sram.vhd:202
integer := 1 init_rbf_mem
Definition: tst_sram.vhd:296
slbit := '0' SMEM_B0_WE
Definition: tst_sram.vhd:204
slv5 := "00001" rbaddr_mdil
Definition: tst_sram.vhd:322
slbit := '0' SEQ_RESET
Definition: tst_sram.vhd:198
slv4 := "1111" omux_smemb3
Definition: tst_sram.vhd:356
slv4 := "1101" omux_smemb1
Definition: tst_sram.vhd:354
slv5 := "01000" rbaddr_slim
Definition: tst_sram.vhd:329
integer := 4 sstat_rbf_veri
Definition: tst_sram.vhd:312
slv4 := "0110" omux_slim
Definition: tst_sram.vhd:347
slv4 := "0001" omux_mdih
Definition: tst_sram.vhd:342
slv( AWIDTH- 1 downto 0) :=( others => '0') maddrzero
Definition: tst_sram.vhd:255
in MEM_BUSY slbit
Definition: tst_sram.vhd:182
out MEM_DI slv32
Definition: tst_sram.vhd:189
AWIDTH natural := 18
Definition: tst_sram.vhd:167
in RESET slbit
Definition: tst_sram.vhd:170
in MEM_ACK_W slbit
Definition: tst_sram.vhd:184
out MEM_RESET slbit
Definition: tst_sram.vhd:179
out RB_LAM slbit
Definition: tst_sram.vhd:174
in BTN slv4
Definition: tst_sram.vhd:176
out MEM_BE slv4
Definition: tst_sram.vhd:188
out RB_STAT slv4
Definition: tst_sram.vhd:173
in MEM_ACT_W slbit
Definition: tst_sram.vhd:186
in CLK slbit
Definition: tst_sram.vhd:169
RB_ADDR slv16 := slv( to_unsigned( 2#0000000000000000#, 16) )
Definition: tst_sram.vhd:166
out MEM_REQ slbit
Definition: tst_sram.vhd:180
in RB_MREQ rb_mreq_type
Definition: tst_sram.vhd:171
out MEM_ADDR slv( AWIDTH- 1 downto 0)
Definition: tst_sram.vhd:187
in MEM_ACT_R slbit
Definition: tst_sram.vhd:185
in MEM_ACK_R slbit
Definition: tst_sram.vhd:183
out RB_SRES rb_sres_type
Definition: tst_sram.vhd:172
in MEM_DO slv32
Definition: tst_sram.vhd:191
out MEM_WE slbit
Definition: tst_sram.vhd:181
out DSP_DAT slv16
Definition: tst_sram.vhd:178
out LED slv8
Definition: tst_sram.vhd:177
in SWI slv8
Definition: tst_sram.vhd:175