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

Subversion Repositories versatile_fft

[/] [versatile_fft/] [trunk/] [multiple_units/] [src/] [icpxram_rbw.vhd] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 wzab
-------------------------------------------------------------------------------
2
-- Title      : icpxram
3
-- Project    : 
4
-------------------------------------------------------------------------------
5
-- File       : icpxram_rbw.vhd
6
-- Author     : Wojciech Zabolotny
7
-- Company    : 
8
-- License    : BSD
9
-- Created    : 2014-01-19
10
-- Last update: 2014-04-25
11
-- Platform   : 
12
-- Standard   : VHDL'93
13
-------------------------------------------------------------------------------
14
-- Description: This block holds the complex numbers with real and imaginary
15
--              parts stored as signed integers with defined bit number
16
--              This memory implements "read before write" behaviour!
17
-------------------------------------------------------------------------------
18
-- Copyright (c) 2014 
19
-------------------------------------------------------------------------------
20
-- Revisions  :
21
-- Date        Version  Author  Description
22
-- 2014-01-19  1.0      wzab    Created
23
-------------------------------------------------------------------------------
24
 
25
 
26
 
27
library ieee;
28
use ieee.std_logic_1164.all;
29
use ieee.std_logic_unsigned.all;
30
library work;
31
use work.icpx.all;
32
 
33
entity dp_ram_rbw_icpx is
34
  generic (
35
    ADDR_WIDTH : integer := 10
36
    );
37
  port (
38
-- common clock
39
    clk    : in  std_logic;
40
    -- Port A
41
    we_a   : in  std_logic;
42
    addr_a : in  std_logic_vector(ADDR_WIDTH-1 downto 0);
43
    data_a : in  icpx_number;
44
    q_a    : out icpx_number;
45
 
46
    -- Port B
47
    we_b   : in  std_logic;
48
    addr_b : in  std_logic_vector(ADDR_WIDTH-1 downto 0);
49
    data_b : in  icpx_number;
50
    q_b    : out icpx_number
51
    );
52
end dp_ram_rbw_icpx;
53
 
54
architecture rtl of dp_ram_rbw_icpx is
55
 
56
  signal s_data_a : std_logic_vector(ICPX_BV_LEN-1 downto 0);
57
  signal s_q_a    : std_logic_vector(ICPX_BV_LEN-1 downto 0);
58
  signal s_data_b : std_logic_vector(ICPX_BV_LEN-1 downto 0);
59
  signal s_q_b    : std_logic_vector(ICPX_BV_LEN-1 downto 0);
60
 
61
  component dp_ram_rbw_scl
62
    generic (
63
      DATA_WIDTH : integer;
64
      ADDR_WIDTH : integer);
65
    port (
66
      clk    : in  std_logic;
67
      we_a   : in  std_logic;
68
      addr_a : in  std_logic_vector(ADDR_WIDTH-1 downto 0);
69
      data_a : in  std_logic_vector(DATA_WIDTH-1 downto 0);
70
      q_a    : out std_logic_vector(DATA_WIDTH-1 downto 0);
71
      we_b   : in  std_logic;
72
      addr_b : in  std_logic_vector(ADDR_WIDTH-1 downto 0);
73
      data_b : in  std_logic_vector(DATA_WIDTH-1 downto 0);
74
      q_b    : out std_logic_vector(DATA_WIDTH-1 downto 0));
75
  end component;
76
 
77
begin
78
 
79
  dp_ram_scl_1 : dp_ram_rbw_scl
80
    generic map (
81
      DATA_WIDTH => ICPX_BV_LEN,
82
      ADDR_WIDTH => ADDR_WIDTH)
83
    port map (
84
      clk    => clk,
85
      we_a   => we_a,
86
      addr_a => addr_a,
87
      data_a => s_data_a,
88
      q_a    => s_q_a,
89
      we_b   => we_b,
90
      addr_b => addr_b,
91
      data_b => s_data_b,
92
      q_b    => s_q_b);
93
 
94
  s_data_a <= icpx2stlv(data_a);
95
  s_data_b <= icpx2stlv(data_b);
96
  q_a      <= stlv2icpx(s_q_a);
97
  q_b      <= stlv2icpx(s_q_b);
98
 
99
end rtl;

powered by: WebSVN 2.1.0

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