Ed
09/16/2023, 10:23 PMEd
09/18/2023, 8:17 AMMitch Bailey
09/18/2023, 9:53 AMverilog/rtl
,
2. modify verilog/rtl/user_proj_example.v
to access your modules and connect to appropriate io signals,
3. make user_proj_example
4. make user_project_wrapper
submit your designEd
09/18/2023, 3:19 PMhtamas
09/18/2023, 6:17 PMEd
09/23/2023, 5:55 PMset_property CONFIG_VOLTAGE 3.3 [current_design]
set_property CFGBVS VCCO [current_design]
# Clock and Reset
set_property -dict { PACKAGE_PIN E3 IOSTANDARD LVCMOS33 } [get_ports {clock}]
create_clock -period 10.0 [get_ports {clock}]
set_property -dict { PACKAGE_PIN C2 IOSTANDARD LVCMOS33 } [get_ports { reset }]
# UART
set_property -dict { PACKAGE_PIN A9 IOSTANDARD LVCMOS33 } [get_ports { io_uartRx }];
set_property -dict { PACKAGE_PIN D10 IOSTANDARD LVCMOS33 } [get_ports { io_uartTx }];
However I cannot quite match those to pins specified in `caravel_user_project/verilog/rtl/user_defines.v`:
`default_nettype none
`ifndef __USER_DEFINES_H
// User GPIO initial configuration parameters
`define __USER_DEFINES_H
// deliberately erroneous placeholder value; user required to config GPIO's to other
`define GPIO_MODE_INVALID 13'hXXXX
// Authoritive source of these MODE defs is: caravel/verilog/rtl/user_defines.v
// Useful GPIO mode values. These match the names used in defs.h.
//
`define GPIO_MODE_MGMT_STD_INPUT_NOPULL 13'h0403
`define GPIO_MODE_MGMT_STD_INPUT_PULLDOWN 13'h0c01
`define GPIO_MODE_MGMT_STD_INPUT_PULLUP 13'h0801
`define GPIO_MODE_MGMT_STD_OUTPUT 13'h1809
`define GPIO_MODE_MGMT_STD_BIDIRECTIONAL 13'h1801
`define GPIO_MODE_MGMT_STD_ANALOG 13'h000b
`define GPIO_MODE_USER_STD_INPUT_NOPULL 13'h0402
`define GPIO_MODE_USER_STD_INPUT_PULLDOWN 13'h0c00
`define GPIO_MODE_USER_STD_INPUT_PULLUP 13'h0800
`define GPIO_MODE_USER_STD_OUTPUT 13'h1808
`define GPIO_MODE_USER_STD_BIDIRECTIONAL 13'h1800
`define GPIO_MODE_USER_STD_OUT_MONITORED 13'h1802
`define GPIO_MODE_USER_STD_ANALOG 13'h000a
// The power-on configuration for GPIO 0 to 4 is fixed and cannot be
// modified (allowing the SPI and debug to always be accessible unless
// overridden by a flash program).
// The values below can be any of the standard types defined above,
// or they can be any 13-bit value if the user wants a non-standard
// startup state for the GPIO. By default, every GPIO from 5 to 37
// is set to power up as an input controlled by the management SoC.
// Users may want to redefine these so that the user project powers
// 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
// 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_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
`endif // __USER_DEFINES_H
Could you point me in the right direction?Ed
09/23/2023, 5:57 PMEd
09/23/2023, 6:00 PMMitch Bailey
09/23/2023, 6:50 PMEd
09/23/2023, 7:03 PMEd
09/23/2023, 7:35 PMuser_project_wrapper.v
declared the following module inputs:
// IOs
input [`MPRJ_IO_PADS-1:0] io_in,
output [`MPRJ_IO_PADS-1:0] io_out,
output [`MPRJ_IO_PADS-1:0] io_oeb,
And I can see that user_proj_example.v
makes use of of those pins. So I suppose the UART RX pin is io_in[5]
and UART TX pin is io_out[6]
?
I am not quite sure what these lines are for in `defines.v`:
`define USER_CONFIG_GPIO_5_INIT `GPIO_MODE_INVALID
Mitch Bailey
09/23/2023, 7:54 PMMitch Bailey
09/23/2023, 8:01 PMGPIO_MODE_USER_STD_INPUT
for RX and GPIO_MODE_USER_STD_OUTPUT
.
Be sure to tie io_oeb[6]
low. io_oeb[5]
should probably be tied to something too - high would be a good choice.Ed
09/23/2023, 8:06 PMIf that’s the case, you can useHow would I make user of the abovefor RX andGPIO_MODE_USER_STD_INPUT
.GPIO_MODE_USER_STD_OUTPUT
user_proj_example.v
? As far as I can see those are not passed into the module...Mitch Bailey
09/23/2023, 8:13 PMuser_project_wrapper
. They affect the gpio_default_blocks
which are part of caravel_core
block. These changes are integrated on the platform when you run the tapeout
job.Ed
09/23/2023, 8:16 PMuser_proj_example.v
...Mitch Bailey
09/23/2023, 8:17 PMio_in[5]
and `io_out[6]`/`io_oeb[6]`, right?Ed
09/23/2023, 8:18 PM