-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gateware: add R3.3 touch sensing support (#54)
Clean up and bring the following changes to master: * gateware/i2c_master: support builds with + without touch scanning * gateware/cal: forward touch0-7 over debug uart to cal tool for debugging * cores/touch_cv: add a simple example of controlling CV outputs with touch example build: ``` $ make BOARD=icebreaker CORE=touch_cv HW_REV=HW_R33 TOUCH=TOUCH_SENSE_ENABLED prog ``` Users must build cores that use touch scanning with `TOUCH=TOUCH_SENSE_ENABLED` otherwise the interface will wire all touch sense lines to zero
- Loading branch information
Showing
15 changed files
with
791 additions
and
74 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
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
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,43 @@ | ||
// | ||
// Touch-to-CV. Touches on input jacks 1-4 are | ||
// translated into CV outputs on outputs 1-4. | ||
// | ||
// When building with touch sensing, be sure to build with | ||
// TOUCH=TOUCH_SENSE_ENABLED, for example: | ||
// | ||
// $ make CORE=touch_cv HW_REV=HW_R33 TOUCH=TOUCH_SENSE_ENABLED | ||
// | ||
|
||
`default_nettype none | ||
|
||
module touch_cv #( | ||
parameter W = 16 | ||
)( | ||
input rst, | ||
input clk, | ||
input sample_clk, | ||
input signed [W-1:0] sample_in0, | ||
input signed [W-1:0] sample_in1, | ||
input signed [W-1:0] sample_in2, | ||
input signed [W-1:0] sample_in3, | ||
output signed [W-1:0] sample_out0, | ||
output signed [W-1:0] sample_out1, | ||
output signed [W-1:0] sample_out2, | ||
output signed [W-1:0] sample_out3, | ||
input [7:0] jack, | ||
input [7:0] touch0, | ||
input [7:0] touch1, | ||
input [7:0] touch2, | ||
input [7:0] touch3, | ||
input [7:0] touch4, | ||
input [7:0] touch5, | ||
input [7:0] touch6, | ||
input [7:0] touch7 | ||
); | ||
|
||
assign sample_out0 = W'(touch0) <<< (W-10); | ||
assign sample_out1 = W'(touch1) <<< (W-10); | ||
assign sample_out2 = W'(touch2) <<< (W-10); | ||
assign sample_out3 = W'(touch3) <<< (W-10); | ||
|
||
endmodule |
Oops, something went wrong.