GithubHelp home page GithubHelp logo

Comments (3)

lromor avatar lromor commented on July 28, 2024 1

Hi! I made a small snippet that reboots the ice40 if you connect the 1-2 pins:

module top (
            output rgb0,
            output rgb1,
            output rgb2,
            input  clki,
            input  user_1,
            output user_2,
            output user_3,
            input  user_4,
            );

   assign rgb1 = 1'b1;
   assign rgb2 = 1'b1;

   // Connect to system clock (with buffering)
   wire clkosc;
   SB_GB clk_gb (
      .USER_SIGNAL_TO_GLOBAL_BUFFER(clki),
      .GLOBAL_BUFFER_OUTPUT(clkosc)
   );

   wire clk = clkosc;

   // Configure user pins so that we can detect the user connecting
   // 1-2 or 3-4 with conductive material.
   //
   // We do this by grounding user_2 and user_3, and configuring inputs
   // with pullups on user_1 and user_4.
   localparam SB_IO_TYPE_SIMPLE_INPUT = 6'b000001;

   assign user_2 = 1'b0;
   assign user_3 = 1'b0;

   // Signal receiving the "touch input"
   wire user_1_pulled;
   SB_IO #(
     .PIN_TYPE(SB_IO_TYPE_SIMPLE_INPUT),
     .PULLUP(1'b1)
   ) user_1_io (
      .PACKAGE_PIN(user_1),
      .OUTPUT_ENABLE(1'b0),
      .INPUT_CLK(clk),
      .D_IN_0(user_1_pulled),
   );

   // We connect sc signal to the warmboot.
   // If we touch with conductive material 1-2
   // The fomu reboots.
   SB_WARMBOOT my_warmboot_i (
     .BOOT (~user_1_pulled), //Level-sensitive trigger signal
     .S1 (1'b0), //S1, S0 specify selection of the configuration image
     .S0 (1'b0)
   );

endmodule

So a trick could be to use the SB_WARMBOOT (SB=SiliconBlue) (?module?).
You can find more of these modules here

Hope it helps!

from fomu-workshop.

yorickvP avatar yorickvP commented on July 28, 2024

If you have wishbone, you can reset with wishbone-tool 0xe0006000 0xac. If you don't, you'll have to write some verilog to support it. You can also do some usb trickery to reset power to the device.

from fomu-workshop.

vshymanskyy avatar vshymanskyy commented on July 28, 2024

I believe, wishbone-tool 0xe0006000 0xac is not working after uploading riscv-blink

from fomu-workshop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.