Skip to content

Instantly share code, notes, and snippets.

@datenwolf
Last active April 13, 2020 18:06
Show Gist options
  • Save datenwolf/58cce1d9c67e58db2d5fc0e644f2ff02 to your computer and use it in GitHub Desktop.
Save datenwolf/58cce1d9c67e58db2d5fc0e644f2ff02 to your computer and use it in GitHub Desktop.
`timescale 1ns / 1ps
// iCEstick signals
//
// clk_12MHz: on board 12MHz crystal oscillator
//
// USB <-> RS232 converter has standard RS232 signals
// DCD, DSR, DTR, CTS, RTS, RXD, TXD
//
// /----------------------------------------
// / A7 A6 A5 A4 A3 A2 A1 A0 GND +3.3V |
// / |
// ---------/ |
// | LED0 C0 C4 |
// | C1 C5 |
// | LED3 LED4 LED1 C2 C6 |
// | C3 C7 |
// | LED2 GND GND |
// ---------\ 3.3V 3.3V |
// \ |
// \ B7 B6 B5 B4 B3 B2 B1 B0 GND +3.3V |
// \----------------------------------------
//
module top (
output A0
);
// ring oscillator
parameter taps = 3;
wire [taps:0] buffers_in, buffers_out;
assign buffers_in = {buffers_out[taps-1:0], chain_in};
assign chain_out = buffers_out[taps];
assign chain_in = !chain_out;
SB_LUT4 #(
.LUT_INIT(16'd2)
) buffers [taps:0] (
.O(buffers_out),
.I0(buffers_in),
.I1(1'b0),
.I2(1'b0),
.I3(1'b0)
);
assign A0 = chain_out;
endmodule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment