cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
2,379 Views
Registered: ‎07-12-2012

Dual port blockram with different width on each port

HI,

 

I am looking for a module like RAMB16 where i need the Rd/Wr width on Port A to be 4 bits whereas the Width on PORT B to be 8 bits. i implemented the logic but i am getting "0000" as read from Port B always whereas port A works fine

 

Thanks

Praveen

0 Kudos
13 Replies
Highlighted
Adventurer
Adventurer
2,368 Views
Registered: ‎08-09-2013

HI,
You can use a memory generator as dual port ram with port a side as 4 bit and port b side as 8 bit. you can even specify the initialized vectors. you can specify the type of memory for building like blockram etc.
0 Kudos
Highlighted
Contributor
Contributor
2,353 Views
Registered: ‎07-12-2012

Thanks for reply, but i cannot use that because i need to use different init values for different projects and thus every time using the vivado memory generator will break the automation flow.

0 Kudos
Highlighted
Adventurer
Adventurer
2,347 Views
Registered: ‎08-09-2013

Hi,

Usually for such applications we create a single memory instance and initialization vector is stored in flash. during power on the data is retrieved from flash into the memory. in such cases the bit file remains same.For different project only the init file gets stored into the flash, which can be selected from the GUI if the flash interface established. 

0 Kudos
Highlighted
Contributor
Contributor
2,345 Views
Registered: ‎07-12-2012

Once again thanks for the reply. But as said earlier we are not using GUI anytime either during generating the bitfile process or  during uploading of bitfile, we use highly automated flow where human intervention is not there. I need a simple way where i can have a dual port ram with 4 bit on PORT A and 8 bits on PORT B, so that i can use script to add INIT values at RTL level and kick off the process, same as the INIT values are present in the attached file with standard RAMB blocks

0 Kudos
Highlighted
Moderator
Moderator
2,332 Views
Registered: ‎08-08-2017

Hi @praveengoyal

 

Use Xilinx Parameterized Micro . These are the alternative for block memory generator.

 

temp.PNG

 

 Refer to the Libraries user guide for Instantiation and attribute definitions.

 https://www.xilinx.com/support/documentation/sw_manuals/xilinx2018_2/ug974-vivado-ultrascale-libraries.pdf

 

---------------------------------------------------------------------------------------------------------------

Reply if you have any queries , Give Kudos and accept as solution

----------------------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------------------------------------
Reply if you have any queries, give kudos and accept as solution
-------------------------------------------------------------------------------------------------------------------------------
0 Kudos
Highlighted
Contributor
Contributor
2,298 Views
Registered: ‎07-12-2012

Thanks for the document, this looks to be the correct IP i would need to instantiate in my design. Where can i find a example instantiation of the same module in my install directory.

Once again thanks.

0 Kudos
Highlighted
Contributor
Contributor
2,295 Views
Registered: ‎07-12-2012

Just to check i should be able to pass the init Values to the module in the instantiation like i have done in the attached file.

0 Kudos
Highlighted
Moderator
Moderator
2,223 Views
Registered: ‎08-08-2017

Hi @praveengoyal

 

You can find the instantiation in Language template or Libraries user Guide (UG974).

vivado2017.2.PNG

The .sv of the Macro  is available at

C:\Xilinx\Vivado\2018.1\data\ip\xpm\memory

 

------------------------------------------------------------------------------------------------------------

Reply if you have any queries , Give Kudos and Accepts as Solution

------------------------------------------------------------------------------------------------------------

 

-------------------------------------------------------------------------------------------------------------------------------
Reply if you have any queries, give kudos and accept as solution
-------------------------------------------------------------------------------------------------------------------------------
0 Kudos
Highlighted
Contributor
Contributor
2,214 Views
Registered: ‎07-12-2012

Is it possible to pass the init values like in RAMB36 instead of passing as a file as in below instance

 

   RAMB36E1 #(
      // INIT_00 to INIT_7F: Initial contents of the data memory array
      .INIT_00 (256'h000000000000000000000000108eeeee717fffffffffffff1f0db00009753110),
      .INIT_01 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_02 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_03 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_04 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_05 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_06 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_07 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_08 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_09 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_0A (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_0B (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_0C (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_0D (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_0E (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_0F (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_10 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_11 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_12 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_13 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_14 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_15 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_16 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_17 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_18 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_19 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_1A (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_1B (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_1C (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_1D (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_1E (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_1F (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_20 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_21 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_22 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_23 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_24 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_25 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_26 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_27 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_28 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_29 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_2A (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_2B (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_2C (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_2D (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_2E (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_2F (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_30 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_31 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_32 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_33 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_34 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_35 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_36 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_37 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_38 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_39 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_3A (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_3B (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_3C (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_3D (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_3E (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_3F (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_40 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_41 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_42 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_43 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_44 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_45 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_46 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_47 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_48 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_49 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_4A (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_4B (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_4C (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_4D (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_4E (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_4F (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_50 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_51 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_52 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_53 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_54 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_55 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_56 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_57 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_58 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_59 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_5A (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_5B (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_5C (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_5D (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_5E (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_5F (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_60 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_61 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_62 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_63 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_64 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_65 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_66 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_67 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_68 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_69 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_6A (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_6B (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_6C (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_6D (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_6E (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_6F (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_70 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_71 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_72 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_73 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_74 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_75 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_76 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_77 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_78 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_79 (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_7A (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_7B (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_7C (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_7D (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_7E (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .INIT_7F (256'h0000000000000000000000000000000000000000000000000000000000000000),
      .READ_WIDTH_A(4),                                                                 // 0-72
      .READ_WIDTH_B(9),                                                                 // 0-36
      .WRITE_WIDTH_A(0),                                                                // 0-36
      .WRITE_WIDTH_B(9),                                                                // 0-72
      .WRITE_MODE_A("WRITE_FIRST")
   )
   u_RAMB36_0 (
      .CASCADEOUTA(),     
      .CASCADEOUTB(),     
      .DBITERR(),          
      .ECCPARITY(),        
      .RDADDRECC(),        
      .SBITERR(),          
      .DOADO(rdata[3:0]),  
      .DOPADOP(),          
      .DOBDO({rdata_bd[35:32],rdata_bd[3:0]}),            
      .DOPBDOP(),          
      .CASCADEINA(1'b0),   
      .CASCADEINB(1'b0),   
      .INJECTDBITERR(1'b0),
      .INJECTSBITERR(1'b0),
      .ADDRARDADDR({addr,2'b0}),
      .CLKARDCLK(clk),     
      .ENARDEN(~cs),       
      .REGCEAREGCE(1'b0),  
      .RSTRAMARSTRAM(1'b0),
      .RSTREGARSTREG(1'b0),
      .WEA(4'b0),          
      .DIADI(),            
      .DIPADIP(),          
      .ADDRBWRADDR({addr_bd,3'b0}),
      .CLKBWRCLK(clk_bd),        
      .ENBWREN(~cs_bd),          
      .REGCEB(),           
      .RSTRAMB(),          
      .RSTREGB(),          
      .WEBWE({~wen_bd[1],~wen_bd[0]}),            
      .DIBDI({wdata_bd[35:32],wdata_bd[3:0]}),            
      .DIPBDIP()           
   );

0 Kudos
Highlighted
Moderator
Moderator
1,903 Views
Registered: ‎08-08-2017

Hi @praveengoyal

 

No , it is not possible to pass the Init values of each address.

 

--------------------------------------------------------------------------------------------------------------------------

Reply if you have any queries, Give Kudos and accepts as solution

----------------------------------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------------------------------------
Reply if you have any queries, give kudos and accept as solution
-------------------------------------------------------------------------------------------------------------------------------
0 Kudos
Highlighted
Contributor
Contributor
1,892 Views
Registered: ‎07-12-2012

Thanks, Could you please then send the format for the INIT MEMORY FILE so that i can use that method to initialize the memory.

0 Kudos
Highlighted
Moderator
Moderator
1,880 Views
Registered: ‎08-08-2017

Hi @praveengoyal

 

The extension is .mem.

File format must be ASCII and consist of only hexadecimal values organized into the specified depth by narrowest data width generic value of the memory.

For example, if the narrowest data width is 8, and the depth of memory is 8 locations, then .mem file content is as below temp.PNG  

 

Where "AB" is the 0th location and "78" is the 7th location.

-----------------------------------------------------------------------------------------------------------------

Give Kudos and accepts as solution

-----------------------------------------------------------------------------------------------------------------

 

 

-------------------------------------------------------------------------------------------------------------------------------
Reply if you have any queries, give kudos and accept as solution
-------------------------------------------------------------------------------------------------------------------------------
0 Kudos
Highlighted
Contributor
Contributor
1,875 Views
Registered: ‎07-12-2012

So if i want to have a TDP memory with PORTA as 32 bit wide  and PORTB as 64 bit wide can i have the following

 

10020000,
10000401,
10000925,
100009ab,
100009bd,
100009cf,
100009d1,
00000000,
00000000,
00000000,
00000000

0 Kudos