-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
usb-serial: device enumeration works, fifo does not
- Loading branch information
1 parent
486998f
commit 8cc45d6
Showing
20 changed files
with
3,183 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
module pll_48 | ||
( | ||
input clkin, // 132 MHz, 0 deg | ||
output clkout0, // 48 MHz, 0 deg | ||
output locked | ||
); | ||
wire clkfb; | ||
wire clkos; | ||
wire clkop; | ||
(* ICP_CURRENT="12" *) (* LPF_RESISTOR="8" *) (* MFG_ENABLE_FILTEROPAMP="1" *) (* MFG_GMCREF_SEL="2" *) | ||
EHXPLLL #( | ||
.PLLRST_ENA("DISABLED"), | ||
.INTFB_WAKE("DISABLED"), | ||
.STDBY_ENABLE("DISABLED"), | ||
.DPHASE_SOURCE("DISABLED"), | ||
.CLKOP_FPHASE(0), | ||
.CLKOP_CPHASE(5), | ||
.OUTDIVIDER_MUXA("DIVA"), | ||
.CLKOP_ENABLE("ENABLED"), | ||
.CLKOP_DIV(12), | ||
.CLKFB_DIV(4), | ||
.CLKI_DIV(11), | ||
.FEEDBK_PATH("INT_OP") | ||
) pll_i ( | ||
.CLKI(clkin), | ||
.CLKFB(clkfb), | ||
.CLKINTFB(clkfb), | ||
.CLKOP(clkop), | ||
.RST(1'b0), | ||
.STDBY(1'b0), | ||
.PHASESEL0(1'b0), | ||
.PHASESEL1(1'b0), | ||
.PHASEDIR(1'b0), | ||
.PHASESTEP(1'b0), | ||
.PLLWAKESYNC(1'b0), | ||
.ENCLKOP(1'b0), | ||
.LOCK(locked) | ||
); | ||
assign clkout0 = clkop; | ||
endmodule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
all: top.bin | ||
|
||
DEVICE-tinyfpga := lp8k | ||
FOOTPRINT-tinyfpga := cm81 | ||
PIN_SRC-tinyfpga := ../tinyfpga-bx.pcf | ||
|
||
DEVICE-tomu := up5k | ||
FOOTPRINT-tomu := uwg30 | ||
PIN_SRC-tomu := ../tomu.pcf | ||
|
||
DEVICE := $(DEVICE-$(BOARD)) | ||
FOOTPRINT := $(FOOTPRINT-$(BOARD)) | ||
PIN_SRC := $(PIN_SRC-$(BOARD)) | ||
|
||
include ../Makefile.icestorm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
`ifndef edge_detect_v | ||
`define edge_detect_v | ||
|
||
module rising_edge_detector ( | ||
input clk, | ||
input in, | ||
output out | ||
); | ||
reg in_q; | ||
|
||
always @(posedge clk) begin | ||
in_q <= in; | ||
end | ||
|
||
assign out = !in_q && in; | ||
endmodule | ||
|
||
module falling_edge_detector ( | ||
input clk, | ||
input in, | ||
output out | ||
); | ||
reg in_q; | ||
|
||
always @(posedge clk) begin | ||
in_q <= in; | ||
end | ||
|
||
assign out = in_q && !in; | ||
endmodule | ||
|
||
`endif |
Oops, something went wrong.