Skip to content

Commit

Permalink
Fix Alhambra-II test lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cavearr committed Jan 12, 2025
1 parent dbd83cb commit da756cb
Show file tree
Hide file tree
Showing 23 changed files with 792 additions and 784 deletions.
1 change: 0 additions & 1 deletion apio/managers/scons.py
Original file line number Diff line number Diff line change
Expand Up @@ -946,4 +946,3 @@ def _run(

# -- Return the exit code
return result.exit_code

Original file line number Diff line number Diff line change
Expand Up @@ -3052,7 +3052,7 @@
"id": "bdc170f0-4468-4137-bd79-4624c9cadf2b",
"type": "basic.code",
"data": {
"code": "//-- Initial value\nreg q = INI;\n\n//-- Capture the input data \n//-- on the rising edge of \n//-- the system clock\nalways @(posedge clk)\n q <= d;",
"code": "//-- Initial value\nreg qi = INI;\nassign q = qi;\n//-- Capture the input data \n//-- on the rising edge of \n//-- the system clock\nalways @(posedge clk)\n qi <= d;",
"params": [
{
"name": "INI"
Expand Down Expand Up @@ -3800,8 +3800,8 @@
"clock": false
},
"position": {
"x": 72,
"y": 256
"x": -16,
"y": 360
}
},
{
Expand All @@ -3811,8 +3811,8 @@
"name": ""
},
"position": {
"x": 704,
"y": 256
"x": 912,
"y": 360
}
},
{
Expand All @@ -3824,15 +3824,15 @@
"local": false
},
"position": {
"x": 408,
"y": -8
"x": 448,
"y": -88
}
},
{
"id": "2b245a71-2d80-466b-955f-e3d61839fe25",
"type": "basic.code",
"data": {
"code": "// 1-Pull up\n\n//-- Place the IO block, configured as \n//-- input with pull-up\nSB_IO\n #(\n .PIN_TYPE(6'b 1010_01),\n \n //-- The pull-up is activated or not\n //-- depeding on the ON parameter\n .PULLUP(ON)\n \n ) input_pin (\n\n //--- Input pin\n .PACKAGE_PIN(i),\n \n //-- Block output\n .D_IN_0(o),\n \n //-- Configured as input\n .OUTPUT_ENABLE(1'b0),\n \n //-- Not used\n .D_OUT_0(1'b0)\n );",
"code": "// 1-Pull up\n\nwire pin_i;\nassign pin_i=i;\nwire unused_d_in_1;\n\n//-- Place the IO block, configured as \n//-- input with pull-up\nSB_IO\n #(\n .PIN_TYPE(6'b1010_01),\n \n //-- The pull-up is activated or not\n //-- depeding on the ON parameter\n .PULLUP(ON)\n \n ) input_pin (\n\n //--- Input pin\n .PACKAGE_PIN(pin_i),\n \n //-- Block output\n .D_IN_0(o),\n \n //-- Configured as input\n .OUTPUT_ENABLE(1'b0),\n \n //-- Not used\n .D_IN_1(unused_d_in_1),\n .D_OUT_0(1'b0),\n .D_OUT_1(1'b0),\n .OUTPUT_CLK(1'b0),\n .INPUT_CLK(1'b0),\n .LATCH_INPUT_VALUE(1'b0), \n .CLOCK_ENABLE(1'b0) \n );",
"params": [
{
"name": "ON"
Expand All @@ -3856,8 +3856,8 @@
"y": 104
},
"size": {
"width": 392,
"height": 368
"width": 480,
"height": 576
}
},
{
Expand Down Expand Up @@ -4468,7 +4468,7 @@
"id": "bdc170f0-4468-4137-bd79-4624c9cadf2b",
"type": "basic.code",
"data": {
"code": "reg q = INI;\n\nalways @(posedge clk)\n if (load)\n q <= d;",
"code": "reg qi = INI;\nassign q = qi;\nalways @(posedge clk)\n if (load)\n qi <= d;",
"params": [
{
"name": "INI"
Expand Down Expand Up @@ -20223,7 +20223,7 @@
"id": "32106310-bfdc-41db-9a7c-2dadd5016c3f",
"type": "basic.code",
"data": {
"code": "localparam N = 8;\n\nreg [N-1:0] q = INI;\n\nalways @(posedge clk)\n if (load)\n q <= d;",
"code": "localparam N = 8;\n\nreg [N-1:0] qi = INI;\n\nalways @(posedge clk)\n if (load)\n qi <= d;\n \nassign q = qi;",
"params": [
{
"name": "INI"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,5 @@
[*]
[*] GTKWave Analyzer v3.3.103 (w)1999-2019 BSI
[*] Thu Apr 28 10:41:03 2022
[*]
[dumpfile] "/home/obijuan/Develop/FPGAwars/apio/test-examples/alhambra-ii/02-jumping-LED/02-jumping-LED_tb.vcd"
[dumpfile_mtime] "Thu Apr 28 10:38:49 2022"
[dumpfile_size] 739918
[savefile] "/home/obijuan/Develop/FPGAwars/apio/test-examples/alhambra-ii/02-jumping-LED/02-jumping-LED_tb.gtkw"
[timestart] 0
[size] 1860 1016
[pos] 60 27
*-17.076054 10000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
[sst_width] 233
[signals_width] 112
[sst_expanded] 1
[sst_vpaned_height] 288
@29
main_tb.clk
@800022
[*] Code generated by Icestudio 0.13.2w202501120101
[*] Sun, 12 Jan 2025 00:12:05 GMT

main_tb.Botón
main_tb.LED[7:0]
@28
(0)main_tb.LED[7:0]
(1)main_tb.LED[7:0]
(2)main_tb.LED[7:0]
(3)main_tb.LED[7:0]
(4)main_tb.LED[7:0]
(5)main_tb.LED[7:0]
(6)main_tb.LED[7:0]
(7)main_tb.LED[7:0]
@1001200
-group_end
@200
-
@28
main_tb.Boton
[pattern_trace] 1
[pattern_trace] 0
Original file line number Diff line number Diff line change
@@ -1,44 +1,53 @@
// Code generated by Icestudio 0.9.2w202204260904
// Thu, 28 Apr 2022 10:23:57 GMT
// Code generated by Icestudio 0.13.2w202501120101
// #START Verilator Linter rules:
/* verilator lint_off PINMISSING */
/* verilator lint_off WIDTHTRUNC */
/* verilator lint_off WIDTHEXPAND */
// #END Verilator Linter rules
// Sun, 12 Jan 2025 00:11:49 GMT

// Testbench template

`default_nettype none
`define DUMPSTR(x) `"x.vcd`"
`timescale 10 ns / 1 ns


module main_tb
;

// Simulation time: 100ns (10 * 10ns)
parameter DURATION = 400;
parameter DURATION = 10;

// TODO: edit the module parameters here
// e.g. localparam constant_value = 1;
localparam constant_Divisor = 240000;
localparam constant_vel_ini = 25;
localparam constant_acel_ini = -2;

//-- Clock signal
reg clk = 0;
always #0.5 clk = ~clk;

// Input/Output
reg Boton;

reg Botón;
wire [7:0] LED;

// Module instance
main MAIN (
.vclk(clk),
.v68e749(Boton),
main #(
.v98ea37(constant_Divisor),
.v315560(constant_vel_ini),
.v0f02ae(constant_acel_ini)
) MAIN (
.v68e749(Botón),
.vb5f8d6(LED)
);

initial begin
// Dump vars to the output .vcd file
// File were to store the simulation results
$dumpfile(`DUMPSTR(`VCD_OUTPUT));
$dumpvars(0, main_tb);

// TODO: initialize the registers here
// e.g. value = 1;
// e.g. #2 value = 0;
Boton = 0;

#1 Boton=1;
Botón = 0;

#(DURATION) $display("End of simulation");
$finish;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Code generated by Icestudio 0.8.1w202112300112
# Code generated by Icestudio 0.13.2w202501120101

set_io vb5f8d6[7] 37
set_io vb5f8d6[6] 38
Expand Down
Loading

0 comments on commit da756cb

Please sign in to comment.