OpenCores
URL https://opencores.org/ocsvn/w11/w11/trunk

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [rtl/] [bplib/] [fx2lib/] [fx2_2fifoctl_ic.vhd] - Blame information for rev 18

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 18 wfjm
-- $Id: fx2_2fifoctl_ic.vhd 472 2013-01-06 14:39:10Z mueller $
2 17 wfjm
--
3 18 wfjm
-- Copyright 2012-2013 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4 17 wfjm
--
5
-- This program is free software; you may redistribute and/or modify it under
6
-- the terms of the GNU General Public License as published by the Free
7
-- Software Foundation, either version 2, or at your option any later version.
8
--
9
-- This program is distributed in the hope that it will be useful, but
10
-- WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
11
-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12
-- for complete details.
13
-- 
14
------------------------------------------------------------------------------
15
-- Module Name:    fx2_2fifoctl_ic - syn
16
-- Description:    Cypress EZ-USB FX2 driver (2 fifo; int clk)
17
--
18
-- Dependencies:   vlib/xlib/iob_reg_o
19
--                 vlib/xlib/iob_reg_i_gen
20
--                 vlib/xlib/iob_reg_o_gen
21
--                 vlib/xlib/iob_reg_io_gen
22
--                 memlib/fifo_2c_dram
23
--
24
-- Test bench:     -
25
-- Target Devices: generic
26
-- Tool versions:  xst 13.3; ghdl 0.29
27
--
28
-- Synthesized (xst):
29
-- Date         Rev  ise         Target      flop lutl lutm slic t peri
30 18 wfjm
-- 2013-01-04   469  13.3   O76x xc3s1200e-4  112  172   64  169 s  7.4/7.4
31
-- 2012-01-14   453  13.3   O76x xc3s1200e-4  101? 173   64  159 s  8.3/7.4
32 17 wfjm
-- 2012-01-08   451  13.3   O76x xc3s1200e-4  110  166   64  163 s  7.5
33
--
34
-- Revision History: 
35
-- Date         Rev Version  Comment
36 18 wfjm
-- 2013-01-04   469   1.2    BUGFIX: redo rx logic, now properly pipelined
37 17 wfjm
-- 2012-01-15   453   1.1    use aempty/afull logic; collapse tx and pe flows
38
-- 2012-01-09   451   1.0    Initial version
39
-- 2012-01-01   448   0.5    First draft 
40
--
41
------------------------------------------------------------------------------
42
 
43
library ieee;
44
use ieee.std_logic_1164.all;
45
use ieee.numeric_std.all;
46
 
47
use work.slvtypes.all;
48
use work.xlib.all;
49
use work.memlib.all;
50
use work.fx2lib.all;
51
 
52
entity fx2_2fifoctl_ic is               -- EZ-USB FX2 driver (2 fifo; int clk)
53
  generic (
54
    RXFAWIDTH : positive :=  5;         -- receive  fifo address width
55
    TXFAWIDTH : positive :=  5;         -- transmit fifo address width
56
    PETOWIDTH : positive :=  7;         -- packet end time-out counter width
57
    CCWIDTH :   positive :=  5;         -- chunk counter width
58
    RXAEMPTY_THRES : natural := 1;      -- threshold for rx aempty flag
59
    TXAFULL_THRES  : natural := 1);     -- threshold for tx afull flag
60
  port (
61
    CLK : in slbit;                     -- clock
62
    RESET : in slbit := '0';            -- reset
63
    RXDATA : out slv8;                  -- receive data out
64
    RXVAL : out slbit;                  -- receive data valid
65
    RXHOLD : in slbit;                  -- receive data hold
66
    RXAEMPTY : out slbit;               -- receive almost empty flag
67
    TXDATA : in slv8;                   -- transmit data in
68
    TXENA : in slbit;                   -- transmit data enable
69
    TXBUSY : out slbit;                 -- transmit data busy
70
    TXAFULL : out slbit;                -- transmit almost full flag
71
    MONI : out fx2ctl_moni_type;        -- monitor port data
72
    I_FX2_IFCLK : in slbit;             -- fx2: interface clock
73
    O_FX2_FIFO : out slv2;              -- fx2: fifo address
74
    I_FX2_FLAG : in slv4;               -- fx2: fifo flags
75
    O_FX2_SLRD_N : out slbit;           -- fx2: read enable    (act.low)
76
    O_FX2_SLWR_N : out slbit;           -- fx2: write enable   (act.low)
77
    O_FX2_SLOE_N : out slbit;           -- fx2: output enable  (act.low)
78
    O_FX2_PKTEND_N : out slbit;         -- fx2: packet end     (act.low)
79
    IO_FX2_DATA : inout slv8            -- fx2: data lines
80
  );
81
end fx2_2fifoctl_ic;
82
 
83
 
84
architecture syn of fx2_2fifoctl_ic is
85
 
86
  constant c_rxfifo : slv2 := c_fifo_ep4;
87
  constant c_txfifo : slv2 := c_fifo_ep6;
88
 
89
  constant c_flag_prog   : integer := 0;
90
  constant c_flag_tx_ff  : integer := 1;
91
  constant c_flag_rx_ef  : integer := 2;
92
  constant c_flag_tx2_ff : integer := 3;
93
 
94
  type state_type is (
95
    s_idle,                             -- s_idle: idle state
96
    s_rxprep0,                          -- s_rxprep0: switch to rx-fifo
97
    s_rxprep1,                          -- s_rxprep1: fifo addr setup
98
    s_rxprep2,                          -- s_rxprep2: wait for flags
99
    s_rxdisp,                           -- s_rxdisp: read, dispatch
100 18 wfjm
    s_rxpipe,                           -- s_rxpipe: read, pipe wait
101 17 wfjm
    s_txprep0,                          -- s_txprep0: switch to tx-fifo
102
    s_txprep1,                          -- s_txprep1: fifo addr setup
103
    s_txprep2,                          -- s_txprep2: wait for flags
104
    s_txdisp                            -- s_txdisp: write, dispatch
105
  );
106
 
107
  type regs_type is record
108
    state : state_type;                 -- state
109
    petocnt : slv(PETOWIDTH-1 downto 0);  -- pktend time out counter
110
    pepend : slbit;                     -- pktend pending
111 18 wfjm
    rxpipe1 : slbit;                    -- read pipe 1: iob capture stage
112
    rxpipe2 : slbit;                    -- read pipe 2: fifo write stage
113 17 wfjm
    ccnt : slv(CCWIDTH-1 downto 0);     -- chunk counter
114
    moni_ep4_sel : slbit;               -- ep4 (rx) select
115
    moni_ep6_sel : slbit;               -- ep6 (tx) select
116
    moni_ep4_pf : slbit;                -- ep4 (rx) prog flag
117
    moni_ep6_pf : slbit;                -- ep6 (tx) prog flag
118
  end record regs_type;
119
 
120
  constant petocnt_init : slv(PETOWIDTH-1 downto 0) := (others=>'0');
121
  constant ccnt_init : slv(CCWIDTH-1 downto 0) := (others=>'0');
122
 
123
  constant regs_init : regs_type := (
124
    s_idle,                             -- state
125
    petocnt_init,                       -- petocnt
126 18 wfjm
    '0',                                -- pepend
127
    '0','0',                            -- rxpipe1, rxpipe2
128 17 wfjm
    ccnt_init,                          -- ccnt
129
    '0','0',                            -- moni_ep(4|6)_sel
130
    '0','0'                             -- moni_ep(4|6)_pf
131
  );
132
 
133
  signal R_REGS : regs_type := regs_init;  -- state registers
134
  signal N_REGS : regs_type := regs_init;  -- next value state regs
135
 
136
  signal FX2_FIFO     : slv2 := (others=>'0');
137
  signal FX2_FIFO_CE  : slbit := '0';
138
  signal FX2_FLAG_N   : slv4 := (others=>'0');
139
  signal FX2_SLRD_N   : slbit := '1';
140
  signal FX2_SLWR_N   : slbit := '1';
141
  signal FX2_SLOE_N   : slbit := '1';
142
  signal FX2_PKTEND_N : slbit := '1';
143
  signal FX2_DATA_CEI : slbit := '0';
144
  signal FX2_DATA_CEO : slbit := '0';
145
  signal FX2_DATA_OE  : slbit := '0';
146
 
147
  signal RXFIFO_DI  : slv8 := (others=>'0');
148
  signal RXFIFO_ENA  : slbit := '0';
149
  signal RXFIFO_BUSY : slbit := '0';
150
  signal RXSIZE_FX2  : slv(RXFAWIDTH-1 downto 0) := (others=>'0');
151
  signal RXSIZE_USR  : slv(RXFAWIDTH-1 downto 0) := (others=>'0');
152
  signal TXFIFO_DO   : slv8 := (others=>'0');
153
  signal TXFIFO_VAL  : slbit := '0';
154
  signal TXFIFO_HOLD : slbit := '0';
155
  signal TXSIZE_FX2  : slv(TXFAWIDTH-1 downto 0) := (others=>'0');
156
  signal TXSIZE_USR  : slv(TXFAWIDTH-1 downto 0) := (others=>'0');
157
 
158
  signal TXBUSY_L : slbit := '0';
159
 
160
  signal R_MONI_C : fx2ctl_moni_type := fx2ctl_moni_init;
161
  signal R_MONI_S : fx2ctl_moni_type := fx2ctl_moni_init;
162
 
163
begin
164
 
165
  assert RXAEMPTY_THRES<=2**RXFAWIDTH-1 and
166
         TXAFULL_THRES<=2**TXFAWIDTH-1
167
    report "assert((RXAEMPTY|TXAFULL)_THRES <= 2**(RX|TX)FAWIDTH)-1"
168
    severity failure;
169
 
170
 
171
  IOB_FX2_FIFO : iob_reg_o_gen
172
    generic map (
173
      DWIDTH => 2,
174
      INIT   => '0')
175
    port map (
176
      CLK => I_FX2_IFCLK,
177
      CE  => FX2_FIFO_CE,
178
      DO  => FX2_FIFO,
179
      PAD => O_FX2_FIFO
180
    );
181
 
182
  IOB_FX2_FLAG : iob_reg_i_gen
183
    generic map (
184
      DWIDTH => 4,
185
      INIT   => '0')
186
    port map (
187
      CLK => I_FX2_IFCLK,
188
      CE  => '1',
189
      DI  => FX2_FLAG_N,
190
      PAD => I_FX2_FLAG
191
    );
192
 
193
  IOB_FX2_SLRD : iob_reg_o
194
    generic map (
195
      INIT   => '1')
196
    port map (
197
      CLK => I_FX2_IFCLK,
198
      CE  => '1',
199
      DO  => FX2_SLRD_N,
200
      PAD => O_FX2_SLRD_N
201
    );
202
 
203
  IOB_FX2_SLWR : iob_reg_o
204
    generic map (
205
      INIT   => '1')
206
    port map (
207
      CLK => I_FX2_IFCLK,
208
      CE  => '1',
209
      DO  => FX2_SLWR_N,
210
      PAD => O_FX2_SLWR_N
211
    );
212
 
213
  IOB_FX2_SLOE : iob_reg_o
214
    generic map (
215
      INIT   => '1')
216
    port map (
217
      CLK => I_FX2_IFCLK,
218
      CE  => '1',
219
      DO  => FX2_SLOE_N,
220
      PAD => O_FX2_SLOE_N
221
    );
222
 
223
  IOB_FX2_PKTEND : iob_reg_o
224
    generic map (
225
      INIT   => '1')
226
    port map (
227
      CLK => I_FX2_IFCLK,
228
      CE  => '1',
229
      DO  => FX2_PKTEND_N,
230
      PAD => O_FX2_PKTEND_N
231
    );
232
 
233
  IOB_FX2_DATA : iob_reg_io_gen
234
    generic map (
235
      DWIDTH => 8,
236
      PULL   => "KEEP")
237
    port map (
238
      CLK => I_FX2_IFCLK,
239
      CEI => FX2_DATA_CEI,
240
      CEO => FX2_DATA_CEO,
241
      OE  => FX2_DATA_OE,
242
      DI  => RXFIFO_DI,                 -- input data   (read from pad)
243
      DO  => TXFIFO_DO,                 -- output data  (write  to pad)
244
      PAD => IO_FX2_DATA
245
    );
246
 
247
  RXFIFO : fifo_2c_dram                -- input fifo, 2 clock, dram based
248
    generic map (
249
      AWIDTH => RXFAWIDTH,
250
      DWIDTH => 8)
251
    port map (
252
      CLKW   => I_FX2_IFCLK,
253
      CLKR   => CLK,
254
      RESETW => '0',
255
      RESETR => RESET,
256
      DI     => RXFIFO_DI,
257
      ENA    => RXFIFO_ENA,
258
      BUSY   => RXFIFO_BUSY,
259
      DO     => RXDATA,
260
      VAL    => RXVAL,
261
      HOLD   => RXHOLD,
262
      SIZEW  => RXSIZE_FX2,
263
      SIZER  => RXSIZE_USR
264
    );
265
 
266
  TXFIFO : fifo_2c_dram                -- output fifo, 2 clock, dram based
267
    generic map (
268
      AWIDTH => TXFAWIDTH,
269
      DWIDTH => 8)
270
    port map (
271
      CLKW   => CLK,
272
      CLKR   => I_FX2_IFCLK,
273
      RESETW => RESET,
274
      RESETR => '0',
275
      DI     => TXDATA,
276
      ENA    => TXENA,
277
      BUSY   => TXBUSY_L,
278
      DO     => TXFIFO_DO,
279
      VAL    => TXFIFO_VAL,
280
      HOLD   => TXFIFO_HOLD,
281
      SIZEW  => TXSIZE_USR,
282
      SIZER  => TXSIZE_FX2
283
    );
284
 
285
  proc_regs: process (I_FX2_IFCLK)
286
  begin
287
 
288
    if rising_edge(I_FX2_IFCLK) then
289
      if RESET = '1' then
290
        R_REGS <= regs_init;
291
      else
292
        R_REGS <= N_REGS;
293
      end if;
294
    end if;
295
 
296
  end process proc_regs;
297
 
298
  proc_next: process (R_REGS,
299
                      FX2_FLAG_N, TXFIFO_VAL, RXSIZE_FX2,
300
                      RXFIFO_BUSY, TXBUSY_L)
301
 
302
    variable r : regs_type := regs_init;
303
    variable n : regs_type := regs_init;
304
 
305
    variable ififo_ce : slbit := '0';
306
    variable ififo    : slv2 := "00";
307
 
308
    variable irxfifo_ena  : slbit := '0';
309
    variable itxfifo_hold : slbit := '0';
310
 
311
    variable islrd   : slbit := '0';
312
    variable islwr   : slbit := '0';
313
    variable isloe   : slbit := '0';
314
    variable ipktend : slbit := '0';
315
 
316
    variable idata_cei : slbit := '0';
317
    variable idata_ceo : slbit := '0';
318
    variable idata_oe  : slbit := '0';
319
 
320
    variable slrxok : slbit := '0';
321
    variable sltxok : slbit := '0';
322
    variable pipeok : slbit := '0';
323
 
324
    variable cc_clr : slbit := '0';
325
    variable cc_cnt : slbit := '0';
326
    variable cc_done : slbit := '0';
327
 
328
  begin
329
 
330
    r := R_REGS;
331
    n := R_REGS;
332
 
333
    ififo_ce := '0';
334
    ififo    := "00";
335
 
336
    irxfifo_ena  := '0';
337
    itxfifo_hold := '1';
338
 
339
    islrd   := '0';
340
    islwr   := '0';
341
    isloe   := '0';
342
    ipktend := '0';
343
 
344
    idata_cei := '0';
345
    idata_ceo := '0';
346
    idata_oe  := '0';
347
 
348
    slrxok := FX2_FLAG_N(c_flag_rx_ef); -- empty flag is act.low!
349
    sltxok := FX2_FLAG_N(c_flag_tx_ff); --  full flag is act.low!
350
    pipeok := FX2_FLAG_N(c_flag_prog);  -- almost flag is act.low!
351
 
352
    cc_clr := '0';
353
    cc_cnt := '0';
354
    if unsigned(r.ccnt) = 0  then
355
      cc_done := '1';
356
    else
357
      cc_done := '0';
358
    end if;
359
 
360 18 wfjm
    n.rxpipe1  := '0';
361
 
362 17 wfjm
    case r.state is
363
      when s_idle =>                    -- s_idle:
364
        if slrxok='1' and RXFIFO_BUSY='0' then
365
          ififo_ce := '1';
366
          ififo    := c_rxfifo;
367
          n.state := s_rxprep1;
368
        elsif sltxok='1' and (TXFIFO_VAL='1' or r.pepend='1')then
369
          ififo_ce := '1';
370
          ififo    := c_txfifo;
371
          n.state := s_txprep1;
372
        end if;
373
 
374
      when s_rxprep0 =>                 -- s_rxprep0: switch to rx-fifo
375
        ififo_ce := '1';
376
        ififo    := c_rxfifo;
377
        n.state := s_rxprep1;
378
 
379
      when s_rxprep1 =>                 -- s_rxprep1: fifo addr setup
380
        cc_clr  := '1';
381
        n.state := s_rxprep2;
382
 
383
      when s_rxprep2 =>                 -- s_rxprep2: wait for flags
384
        isloe   := '1';
385
        n.state := s_rxdisp;
386
 
387
      when s_rxdisp =>                  -- s_rxdisp: read, dispatch
388
        isloe := '1';
389
        -- if chunk done and tx or pe pending and possible
390
        if cc_done='1' and sltxok='1' and (TXFIFO_VAL='1' or r.pepend='1') then
391 18 wfjm
          if r.rxpipe1='1' or r.rxpipe2='1' then -- rx pipe busy ?
392
            n.state := s_rxdisp;            -- wait
393
          else
394
            n.state := s_txprep0;           -- otherwise switch to tx flow
395
          end if;
396 17 wfjm
        -- if more rx to do and possible
397 18 wfjm
        elsif slrxok='1' and unsigned(RXSIZE_FX2)>3 then  -- !thres must be >3!
398
          islrd := '1';
399 17 wfjm
          cc_cnt := '1';
400 18 wfjm
          n.rxpipe1 := '1';
401
          if pipeok='1' then
402
            n.state := s_rxdisp;             -- 1 cycle read
403
            --n.state := s_rxprep2;            -- 2 cycle read
404 17 wfjm
          else
405
            n.state := s_rxpipe;
406 18 wfjm
          end if;
407 17 wfjm
        -- otherwise back to idle
408
        else
409 18 wfjm
          if r.rxpipe1='1' or r.rxpipe2='1' then -- rx pipe busy ?
410
            n.state := s_rxdisp;            -- wait
411
          else
412
            n.state := s_idle;              -- to idle
413
          end if;
414 17 wfjm
        end if;
415
 
416 18 wfjm
      when s_rxpipe =>                  -- s_rxpipe:  read, pipe wait
417 17 wfjm
        isloe := '1';
418 18 wfjm
        n.state := s_rxprep2;
419
 
420 17 wfjm
      when s_txprep0 =>                 -- s_txprep0: switch to tx-fifo
421
        ififo_ce := '1';
422
        ififo    := c_txfifo;
423
        n.state := s_txprep1;
424
 
425
      when s_txprep1 =>                 -- s_txprep1: fifo addr setup
426
        cc_clr  := '1';
427
        n.state := s_txprep2;
428
 
429
      when s_txprep2 =>                 -- s_txprep2: wait for flags
430
        n.state := s_txdisp;
431
 
432
      when s_txdisp =>                  -- s_txdisp: write, dispatch
433
        -- if chunk done and rx pending and possible
434
        if cc_done='1' and slrxok='1' and RXFIFO_BUSY='0' then
435
          n.state := s_rxprep0;
436
        -- if pktend to do and possible
437
        elsif sltxok = '1' and r.pepend = '1' then
438
          ipktend  := '1';
439
          n.pepend := '0';
440
          n.state := s_idle;
441
        -- if more tx to do and possible
442
        elsif sltxok = '1' and TXFIFO_VAL = '1' then
443
          cc_cnt := '1';                  -- inc chunk count
444
          n.pepend := '0';                -- cancel pe (avoid back-2-back tx+pe)
445
          itxfifo_hold := '0';
446
          idata_ceo := '1';
447
          idata_oe  := '1';
448
          islwr     := '1';
449
          if pipeok = '1' then           -- if not almost full
450
            n.state   := s_txdisp;          -- stream 
451
          else
452
            n.state   := s_txprep1;         -- wait for full flag
453
          end if;
454
        -- otherwise back to idle
455
        else
456
          n.state := s_idle;
457
        end if;
458
 
459
      when others => null;
460
    end case;
461
 
462 18 wfjm
    -- rx pipe handling
463
    idata_cei   := r.rxpipe1;
464
    n.rxpipe2   := r.rxpipe1;
465
    irxfifo_ena := r.rxpipe2;
466
 
467 17 wfjm
    -- chunk counter handling
468
    if cc_clr = '1' then
469
      n.ccnt := (others=>'1');
470
    elsif cc_cnt='1' and unsigned(r.ccnt) > 0 then
471
      n.ccnt := slv(unsigned(r.ccnt) - 1);
472
    end if;
473
 
474
    -- pktend time-out handling:
475
    --   if tx fifo is non-empty, set counter to max
476
    --   if tx fifo is empty, count down every usec
477
    --   on 1->0 transition queue pktend request
478
    if TXFIFO_VAL = '1' then
479
      n.petocnt := (others=>'1');
480
    else
481
      if unsigned(r.petocnt) /= 0 then
482
        n.petocnt := slv(unsigned(r.petocnt) - 1);
483
        if unsigned(r.petocnt) = 1 then
484
          n.pepend := '1';
485
        end if;
486
      end if;
487
    end if;
488
 
489
    n.moni_ep4_sel := '0';
490
    n.moni_ep6_sel := '0';
491
    if r.state = s_rxdisp or r.state = s_rxpipe then
492
      n.moni_ep4_sel := '1';
493
      n.moni_ep4_pf  := not FX2_FLAG_N(c_flag_prog);
494
    elsif r.state = s_txdisp then
495
      n.moni_ep6_sel := '1';
496
      n.moni_ep6_pf  := not FX2_FLAG_N(c_flag_prog);
497
    end if;
498
 
499
    N_REGS <= n;
500
 
501
    FX2_FIFO_CE  <= ififo_ce;
502
    FX2_FIFO     <= ififo;
503
 
504
    FX2_SLRD_N   <= not islrd;
505
    FX2_SLWR_N   <= not islwr;
506
    FX2_SLOE_N   <= not isloe;
507
    FX2_PKTEND_N <= not ipktend;
508
 
509
    FX2_DATA_CEI <= idata_cei;
510
    FX2_DATA_CEO <= idata_ceo;
511
    FX2_DATA_OE  <= idata_oe;
512
 
513
    RXFIFO_ENA   <= irxfifo_ena;
514
    TXFIFO_HOLD  <= itxfifo_hold;
515
 
516
  end process proc_next;
517
 
518
  proc_moni: process (CLK)
519
  begin
520
 
521
    if rising_edge(CLK) then
522
      if RESET = '1' then
523
        R_MONI_C <= fx2ctl_moni_init;
524
        R_MONI_S <= fx2ctl_moni_init;
525
      else
526
        R_MONI_C <= fx2ctl_moni_init;
527
        R_MONI_C.fifo_ep4        <= R_REGS.moni_ep4_sel;
528
        R_MONI_C.fifo_ep6        <= R_REGS.moni_ep6_sel;
529
        R_MONI_C.flag_ep4_empty  <= not FX2_FLAG_N(c_flag_rx_ef);
530
        R_MONI_C.flag_ep4_almost <= R_REGS.moni_ep4_pf;
531
        R_MONI_C.flag_ep6_full   <= not FX2_FLAG_N(c_flag_tx_ff);
532
        R_MONI_C.flag_ep6_almost <= R_REGS.moni_ep6_pf;
533
        R_MONI_C.slrd            <= not FX2_SLRD_N;
534
        R_MONI_C.slwr            <= not FX2_SLWR_N;
535
        R_MONI_C.pktend          <= not FX2_PKTEND_N;
536
        R_MONI_S <= R_MONI_C;
537
      end if;
538
    end if;
539
 
540
  end process proc_moni;
541
 
542
  proc_almost: process (RXSIZE_USR, TXSIZE_USR)
543
  begin
544
 
545
    -- rxsize_usr is the number of bytes to read
546
    -- txsize_usr is the number of bytes to write
547
 
548
    if unsigned(RXSIZE_USR) <= RXAEMPTY_THRES then
549
      RXAEMPTY <= '1';
550
    else
551
      RXAEMPTY <= '0';
552
    end if;
553
 
554
    if unsigned(TXSIZE_USR) <= TXAFULL_THRES then
555
      TXAFULL <= '1';
556
    else
557
      TXAFULL <= '0';
558
    end if;
559
 
560
  end process proc_almost;
561
 
562
  TXBUSY <= TXBUSY_L;
563
 
564
  MONI <= R_MONI_S;
565
 
566
end syn;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.