Processing of Memory (ram, rom) during DC synthesis

Table of contents


Preface

       Before DC synthesis, if we look at the filelist of some projects, we can find that there will be many memory modules, such as ram, rom, etc. However, if memory is directly integrated into the synthesis, the result may be untrustworthy and encounter big problems. When synthesizing memory in a project, it will get stuck, so this article will explain how to process the DC synthesized memory.


1. Problems encountered by DC comprehensive memory

       Previously, DC was used to synthesize a small part of a project, such as the e203 core synthesized before, which did not involve memory processing.

       However, this project needs to integrate C910 to see the utilization of resources. This is the first time for me to do this kind of integration of the entire large project. I asked a friend in the same group who had done the integration of the entire e906 project before. I saw that they filelist, directly read the memory for synthesis. You can see the picture below.

        You can see that e906 has relatively less ram, so they are not stuck. But for the C910 I synthesized this time, you can take a look at the ram part of this filelist.

       This is a part. There are about 80 memories in total. I didn’t take care of it at first. I just wrote the script and synthesized it. I found that it got stuck in the middle of the synthesis, and the following situation occurred.

       Therefore, we cannot directly synthesize memory and must process it.

2. Memory (ram, rom) processing

1.Solution ideas

       So the specific solution is to use the Memory Complier tool to generate the required memory, such as the ram I need this time. Then use this tool to generate lib format. Then return to the server and use Lib complier to convert it into db format. During DC synthesis, just read the ram as a library.

      

2.Memaker installation

       Once you have a solution, just use the tools. But there is no ready-made Memory Complier on the Internet, so I used Memaker provided by the teacher.

needed file:

Virtual machine software VMware

Virtual machine image CentOS7-x86_64-DVD-2009

memaker compressed package FSF0L_Memaker_202101.3.0.tar

license file memaker.dat

Plugin libXScrnSaver-1.2.2-6.1.el7.i686

1. Open VMware and create a new virtual machine

2. Drag the memaker compressed package into the virtual machine and extract it.

After unzipping, drag memaker.dat to the installation directory.

Note: The hostname and VENDOR ftclmd address in memaker need to be changed by yourself

3. Modify the memlib address in memaker.env

4. Set the IP address (use the su command to open administrator rights)

CentOS 7 changes the network card name eth0 and configures the network card_openbox2008's blog-CSDN blog_centos7 network card configuration

1. Edit grub configuration file

# vim /etc/default/grub 或 vim /etc/sysconfig/grub

Add net.ifnames=0 biosdevname=0 in GRUB_CMDLINE_LINUX

2. Use the grub2-mkconfig command to regenerate the GRUB configuration and update the kernel.

# grub2-mkconfig -o /boot/grub2/grub.cfg

Just complete this step and then restart the Linux operating system. Through # ip addr, you can see that the network card name has changed to eth0 and the network can be used normally, but the network configuration file is still ifcfg-ens33.

3. Modify the network card configuration file

Change the original network card configuration file name to ifcfg-ens33. Here you need to change it to eth0 and ifcfg-ens34 to eth1, and adjust the network card configuration file appropriately.

#mv ifcfg-ens33 ifcfg-eth0

#mv ifcfg-ens34 ifcfg-eth1

And modify the network card configuration file

4. Restart the virtual machine

5. Open the terminal and enter the command in Han.txt

If it prompts that there is a problem with the license, set the system time back to before October 2022 and try again.

5. If you are prompted that the libXScrnSaver plug-in is missing, install it and try again.

Download the plug-in compressed package and drag it into the virtual machine to install.

Or enter yum install libXScrnSaver in administrator mode.

3.Memaker use

3.1 Open Memaker

Open it directly through command line input, and you can enter the following GUI interface.

 3.2 Generation of Ram

       Because the size of Ram is known, Memory Type is directly selected to generate.

       Take one of the Rams as an example. What I want to generate is a 128✖️16 Ram, and the C910 uses single-port Ram, so in the first step, select "single port ram" in the Memory Famile; in the second step, word represents the address bit. Fill in 128; in the third step, Bit represents the data bit width, fill in 16, and the rest are default, and then click Preview in the fourth step.

After that, you can see the preview interface of each generated ram. We need to use the first one, so just check the first one.

The next step will display some basic information about the device you selected. You can check if there are any errors and change the name to the name you need. Here are the default names. 

After that, in this step, you can choose the information you want to generate. There are many options. Because I only need the lib file, I only checked the lib and generate .v files. When generating .v, I mainly want to see what is written in it. What does it look like. Then click Generate to successfully generate what we need.

We can take a look at the generated files. In addition to .v files, many libs are generated. Here we break down the naming rules of each lib.

Taking the suffixes ff1p32v85c and ss1p08vm40c as examples, this suffix represents two parts. First, the first part represents the voltage: 1p32v represents 1.32v, 1p08 represents 1.08v; secondly, the second part represents the temperature: 85c represents 85 degrees, and m40c represents -40 degrees.

4.Lib Complier

This is very simple, just write a conversion script to convert all lib into db. When writing scripts, you need to know the Lib Complier commands.

4.1 Create a new db folder and a lib folder

4.2 Copy all converted lib files to the lib folder

4.3 Write a tcl script and name it autolib2db

set enable_write_db_mode True

set files [split [glob lib/*.lib] " "]

foreach file $files {
read_lib $file
set libname [lindex [split [lindex [split $file "/"] [expr [llength [split $file "/"]]-1]] "."] 0]
write_lib -output db/${libname}.db $libname
remove_design
}

exit

4.4 Run tcl script

Get all the converted db files, save them in the db folder, and then import them into the dc project as a library.

Guess you like

Origin blog.csdn.net/m0_45287781/article/details/128724650