From 4c640c96fbae4aa515477392bfa79914bb79e6ef Mon Sep 17 00:00:00 2001 From: Anton Maurovic Date: Fri, 10 May 2024 05:06:19 +0930 Subject: [PATCH] Update README and user_defines --- README.md | 38 +++++++++++++++++++++- verilog/rtl/user_defines.v | 66 +++++++++++++++++++------------------- 2 files changed, 70 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 2ae1283..7102fc2 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,43 @@ This is an OpenLane-1.x-based example of using an Efabless Marketplace IP packge, installed using `ipm`. -Specifically, it demonstrates use of the EFSRAM_01024x032_008_18 high-density SRAM IP. +Specifically, it demonstrates use of the commercial EFSRAM_01024x032_008_18 high-density SRAM IP. + +This repo was made from https://github.com/efabless/caravel_user_project originally and then adapted with guidance from the similar project: https://github.com/efabless/caravel_user_sram + +To build the GDS in this repo: + +1. Install IPM: + ```bash + cd ~ + git clone https://github.com/efabless/IPM.git + pip install ./IPM + # Test: + ipm ls-remote + ``` +2. Clone this repo: + ```bash + git clone https://github.com/amm-efabless/my_sram_test_chip1 + ``` +3. Setup your enviroment (installs OpenLane, PDK, etc): + ```bash + cd my_sram_test_chip1 + make setup + ``` +4. Install the EFSRAM IP: + ``` + ipm install-dep + ``` + NOTE: At the time of writing, this might require special access to private repos for some IPs (including EFSRAM). This is expected to change as some IPs become officially published. For more info, see: https://github.com/efabless/IPM +5. Harden the example `wishbone_sram` macro (which includes the SRAM hard IP): + ``` + make wishbone_sram + ``` + NOTE: At the time of writing, expect some minor linter errors about shorted ports, and 1 DRC violation. +6. Harden the `user_project_wrapper` + ``` + make user_project_wrapper + ``` ## Basic Caravel User Project guides diff --git a/verilog/rtl/user_defines.v b/verilog/rtl/user_defines.v index ee44b08..ec43102 100644 --- a/verilog/rtl/user_defines.v +++ b/verilog/rtl/user_defines.v @@ -52,41 +52,41 @@ // up in a state that can be used immediately without depending on // the management SoC to run a startup program to configure the GPIOs. -`define USER_CONFIG_GPIO_5_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_6_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_7_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_8_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_9_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_10_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_11_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_12_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_13_INIT `GPIO_MODE_INVALID +`define USER_CONFIG_GPIO_5_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_6_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_7_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_8_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_9_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_10_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_11_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_12_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_13_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN // Configurations of GPIO 14 to 24 are used on caravel but not caravan. -`define USER_CONFIG_GPIO_14_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_15_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_16_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_17_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_18_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_19_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_20_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_21_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_22_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_23_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_24_INIT `GPIO_MODE_INVALID +`define USER_CONFIG_GPIO_14_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_15_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_16_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_17_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_18_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_19_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_20_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_21_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_22_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_23_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_24_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN -`define USER_CONFIG_GPIO_25_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_26_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_27_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_28_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_29_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_30_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_31_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_32_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_33_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_34_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_35_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_36_INIT `GPIO_MODE_INVALID -`define USER_CONFIG_GPIO_37_INIT `GPIO_MODE_INVALID +`define USER_CONFIG_GPIO_25_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_26_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_27_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_28_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_29_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_30_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_31_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_32_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_33_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_34_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_35_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_36_INIT `GPIO_MODE_MGMT_STD_INPUT_PULLDOWN +`define USER_CONFIG_GPIO_37_INIT `GPIO_MODE_USER_STD_OUTPUT `endif // __USER_DEFINES_H