Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

VHDL FF based memory array

Status
Not open for further replies.

shaiko

Advanced Member level 5
Joined
Aug 20, 2011
Messages
2,644
Helped
303
Reputation
608
Reaction score
297
Trophy points
1,363
Activity points
18,302
Hello,

When I have a FF based memory array and I want to bring it's ports to the entity's output - I concatanate all the memory cells to a single long vector of length: memory_depth * memory_width

But is it possible to define the entity I/Os themselves as a 2D array ?
 

Yes. You'll have to declare the type in a package though.
 

Please elaborate.

Can you show an example please...
 

Code:
package types_package is 
  type 2d_array_t is array(natural range <>, natural range <>) of integer;
end package;

use work.types_package.all;

entity some_ent is 
  generic(
    MEMORY_DEPTH : natural;
    MEMORY_WIDTH : natural
  );

  port (
    regs : out 2d_array_t(0 to MEMORY_DEPTH-1, 0 to MEMORY_WIDTH-1)
 );
end entity;
 
  • Like
Reactions: shaiko

    shaiko

    Points: 2
    Helpful Answer Positive Rating
THANKS TrickyDicky !

BTW ;
Does Verilog has this type as a standart ?
 

I dont know a lot about verilog, but afaik standard verilog limits arrays to 2d (its limitless in VHDL). SystemVerilog removes this restriction.
 

But only 2D's are synthesizable...yes, I know that.

What I meant is:
Per your explanation I see that an array IO isn't a standart type in VHDL - and requires a type def to work...I asked if array IOs in Verilog are a standart feature of the language?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top