Conversation
|
I forgot that the core files are autogenerated :(( Failing lint |
7d06a9f to
6ddb362
Compare
martin-velay
left a comment
There was a problem hiding this comment.
I have some initial comments. It's a very good start though!
d83b568 to
32c5f09
Compare
8a5da04 to
93f0c4e
Compare
|
HI @martin, Thanks for the detailed review. I realized yesterday that the comments I added in the test and vseq were way more difficult and I spent some time making it a bit easier to understanding. Do you mind take another look? Some of your comments are unresolved because either I asked for a go-ahead or a question in replies. |
4534ce8 to
5ade54b
Compare
The motivation of this PR comes from lowRISC#382 which is adding a chip level GPIO test for Xcelium. That test fails on verilator. The reason being different tops used for both of the tools. For Xcelium, an interface is connecting the UVM to the GPIO. The UVM have the control to drive GPIOs inputs. In lowRISC#382, the SW waits for a specific pattern driven by UVM to appear in `data_in` reg. If we run the exact test with the verilator top, which is using GPIO DPI, then the abilty to drive the inputs depends on a host SW infrastructure which is currently missing. With the above context, the best way forward is to separate the GPIO smoketest for both of the simulators for now to make the CI happy. Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
The motivation of this PR comes from lowRISC#382 which is adding a chip level GPIO test for Xcelium. That test fails on verilator. The reason being different tops used for both of the tools. For Xcelium, an interface is connecting the UVM to the GPIO. The UVM have the control to drive GPIOs inputs. In lowRISC#382, the SW waits for a specific pattern driven by UVM to appear in `data_in` reg. If we run the exact test with the verilator top, which is using GPIO DPI, then the abilty to drive the inputs depends on a host SW infrastructure which is currently missing. With the above context, the best way forward is to separate the GPIO smoketest for both of the simulators for now to make the CI happy. Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
7dad408 to
44b2ba3
Compare
The motivation of this PR comes from lowRISC#382 which is adding a chip level GPIO smoke test. That test fails on verilator. Reason being different tops used for different platforms ( DVSim(Xcelium), Verilator, FPGA). For Xcelium, an interface is connecting the UVM to the GPIO. UVM has the control to drive GPIOs inputs. In lowRISC#382, SW waits for a specific pattern driven by UVM to arrive in data_in reg. If we run the exact test with the verilator top, which is using GPIO DPI, then the abilty to drive inputs depends on a host SW infrastructure which is currently missing. Second problem is that we use cmake to build software images for DVSim, verilator and FPGA. We run tests on FPGA and Verilator in CI. If the build system develops an Xcelium compatible image and feed that image to Verilator and FPGA to execute the test in CI then the test will fail due to the reason given in the first paragraph. Hence, the best way forward is to make images only for the compatible paltforms. Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
Reason being that lowRISC#382 is adding another test which will check if every outputs and inputs can be driven in high/low combinations. That is a much refined definition of a smoke test. The second reason of renaming gpio/smoketest.c to gpio/reg_access_test.c is that the test added in the PR lowRISC#382 is incompatible for Verilator and FPGA tops. This also requires to ask the build system to only make images of GPIO tests for their compatible tops. So, the better approach is to rename the test after their features and add additional options to the build system in order to make their images for different platforms. Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
Reason being that #382 is adding another test which will check if every outputs and inputs can be driven in high/low combinations. That is a much refined definition of a smoke test. The second reason of renaming gpio/smoketest.c to gpio/reg_access_test.c is that the test added in the PR #382 is incompatible for Verilator and FPGA tops. This also requires to ask the build system to only make images of GPIO tests for their compatible tops. So, the better approach is to rename the test after their features and add additional options to the build system in order to make their images for different platforms. Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
The motivation of this PR comes from lowRISC#382 which is adding a chip level GPIO smoke test. That test fails on verilator. Reason being different tops used for different platforms ( DVSim(Xcelium), Verilator, FPGA). For Xcelium, an interface is connecting the UVM to the GPIO. UVM has the control to drive GPIOs inputs. In lowRISC#382, SW waits for a specific pattern driven by UVM to arrive in data_in reg. If we run the exact test with the verilator top, which is using GPIO DPI, then the abilty to drive inputs depends on a host SW infrastructure which is currently missing. Second problem is that we use cmake to build software images for DVSim, verilator and FPGA. We run tests on FPGA and Verilator in CI. If the build system develops an Xcelium compatible image and feed that image to Verilator and FPGA to execute the test in CI then the test will fail due to the reason given in the first paragraph. Hence, the best way forward is to make images only for the compatible paltforms. Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
The motivation of this PR comes from lowRISC#382 which is adding a chip level GPIO smoke test. That test fails on verilator. Reason being different tops used for different platforms ( DVSim(Xcelium), Verilator, FPGA). For Xcelium, an interface is connecting the UVM to the GPIO. UVM has the control to drive GPIOs inputs. In lowRISC#382, SW waits for a specific pattern driven by UVM to arrive in data_in reg. If we run the exact test with the verilator top, which is using GPIO DPI, then the abilty to drive inputs depends on a host SW infrastructure which is currently missing. Second problem is that we use cmake to build software images for DVSim, verilator and FPGA. We run tests on FPGA and Verilator in CI. If the build system develops an Xcelium compatible image and feed that image to Verilator and FPGA to execute the test in CI then the test will fail due to the reason given in the first paragraph. Hence, the best way forward is to make images only for the compatible paltforms. Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
The motivation of this PR comes from lowRISC#382 which is adding a chip level GPIO smoke test. That test fails on verilator. Reason being different tops used for different platforms ( DVSim(Xcelium), Verilator, FPGA). For Xcelium, an interface is connecting the UVM to the GPIO. UVM has the control to drive GPIOs inputs. In lowRISC#382, SW waits for a specific pattern driven by UVM to arrive in data_in reg. If we run the exact test with the verilator top, which is using GPIO DPI, then the abilty to drive inputs depends on a host SW infrastructure which is currently missing. Second problem is that we use cmake to build software images for DVSim, verilator and FPGA. We run tests on FPGA and Verilator in CI. If the build system develops an Xcelium compatible image and feed that image to Verilator and FPGA to execute the test in CI then the test will fail due to the reason given in the first paragraph. Hence, the best way forward is to make images only for the compatible paltforms. Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
The motivation of this PR comes from lowRISC#382 which is adding a chip level GPIO smoke test. That test fails on verilator. Reason being different tops used for different platforms (DVSim(Xcelium), Verilator, FPGA). For Xcelium, an interface is connecting the UVM to the GPIO. UVM has the control to drive GPIOs inputs. In 382, SW waits for a specific pattern driven by UVM to arrive in data_in reg. If we run the exacttest with the verilator top, which is using GPIO DPI, then the abilty to drive inputs depends on a host SW infrastructure which is currently missing. Second problem is that we use cmake to build software images for DVSim, verilator and FPGA. We run tests on FPGA and Verilator in CI. If the build system develops an Xcelium compatible image and feed that image to Verilator and FPGA to execute the test in CI then the test will fail due to the reason given in the first paragraph. Hence, the best way forward is to make images only for the compatible plaforms. Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
The motivation of this PR comes from #382 which is adding a chip level GPIO smoke test. That test fails on verilator. Reason being different tops used for different platforms (DVSim(Xcelium), Verilator, FPGA). For Xcelium, an interface is connecting the UVM to the GPIO. UVM has the control to drive GPIOs inputs. In 382, SW waits for a specific pattern driven by UVM to arrive in data_in reg. If we run the exacttest with the verilator top, which is using GPIO DPI, then the abilty to drive inputs depends on a host SW infrastructure which is currently missing. Second problem is that we use cmake to build software images for DVSim, verilator and FPGA. We run tests on FPGA and Verilator in CI. If the build system develops an Xcelium compatible image and feed that image to Verilator and FPGA to execute the test in CI then the test will fail due to the reason given in the first paragraph. Hence, the best way forward is to make images only for the compatible plaforms. Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
engdoreis
left a comment
There was a problem hiding this comment.
The Software changes LGTM.
|
Converting to draft as it depends on #442 |
| // Assignment to the GPIO pads. If dut_gpio_en_o[i] is disabled, then let the gpio_pad[i] float so | ||
| // an external device/driver can drive it. | ||
| for (genvar i = 0; i < NUM_GPIOS; i++) begin : gen_gpio_pads | ||
| assign gpio_pads[i] = dut_gpio_en_o[i] ? dut_gpio_o[i] : 1'bz; |
There was a problem hiding this comment.
I just bumped into this when trying to make the bootrom boostrap pin to work with dvsim. Is it possible to make the pin 8 high if output enable high rathen then floating?
There was a problem hiding this comment.
I guess it is possible, can you explain a bit more the reason in order to document this behavior with an explicit comment
There was a problem hiding this comment.
The gpio 8 is now used by the bootrom to decide if it should enter spi bootstrap or jump to the next stage (test). For now we only want to enter spi bootstrap in the FPGA. In sumulation we would load both (rom and test) and skip bootstrap. For that to work we need the gpio 8 to be pulled high during boot.
Maybe it's easier to pull all pin high (that's is what I'm going to do for verilator)?
There was a problem hiding this comment.
Kinza showed me the pins_if.sv which already has a pull functionality. Hopefully we can use that and set all the pins to pull up.
There was a problem hiding this comment.
Hi @engdoreis,
I've done it for every pin in this commit: fdbe886
I can pull out that commit along with 2b54119 in a separate PR if your work is urgent?
marnovandermaas
left a comment
There was a problem hiding this comment.
Two minor comments.
| clk_rst_if sys_clk_if(.clk(clk), .rst_n(rst_n)); | ||
| clk_rst_if peri_clk_if(.clk(peri_clk), .rst_n(peri_rst_n)); | ||
| uart_if uart_if(); | ||
| pins_if #(NUM_GPIOS) gpio_if (.pins(gpio_pads)); |
There was a problem hiding this comment.
A bit confusing that gpio_if is the name of pins_if, maybe gpio_pins_if?
| // Assignment to the GPIO pads. If dut_gpio_en_o[i] is disabled, then let the gpio_pad[i] float so | ||
| // an external device/driver can drive it. | ||
| for (genvar i = 0; i < NUM_GPIOS; i++) begin : gen_gpio_pads | ||
| assign gpio_pads[i] = dut_gpio_en_o[i] ? dut_gpio_o[i] : 1'bz; |
There was a problem hiding this comment.
Kinza showed me the pins_if.sv which already has a pull functionality. Hopefully we can use that and set all the pins to pull up.
Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
This test is supposed to work in pair with UVM and FPGA. Through UVM, we intend to drive the inputs but we can't yet achieve this functionality through verilator and FPGA tops. Thus, ask the build system to skip making verilator and FPGA images to run that test and this is only compatible for a DVSim top now. Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
Both SW and vseq works in pairs. The SW drives the pins in outputs and set each pin in walking 1's fashion and waits for the pattern driven by vseq. The vseq once seen all the W1's pattern on each pin will then drive a pattern on GPIO inputs and SW waits for that pattern by reading `data_in` reg. Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
…le SW images Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
Read the comment added in tb.sv to understand the context. Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
GPIO pins are initialized with pulls high to support SW booting process. Disable them once booting is done. Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
Merge #442 as dependency
This PR added functionality to make the gpio smoketest working on the chip level.
Will close: #147