Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add TinyFPGA BX support #232

Merged
merged 2 commits into from
Jul 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
*.log
*.mo

*.swp
*~

.tmp
dist
cache
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
| [BlackIce](https://hackaday.io/project/12930-blackice-low-cost-open-hardware-fpga-dev-board) | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| [BlackIce II](https://github.com/mystorm-org/BlackIce-II) | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| [TinyFPGA B2](http://tinyfpga.com/b-series-guide.html) | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| [TinyFPGA BX](http://tinyfpga.com/b-series-guide.html) | :white_check_mark: | :white_check_mark: | :white_check_mark: |

**\*** Use with Raspberry Pi

Expand Down
7 changes: 4 additions & 3 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
"icon": "resources/images/icestudio-logo.png"
},
"apio": {
"min": "0.3.3",
"max": "0.4.0",
"min": "0.4.0",
"max": "0.5.0",
"extras": [
"blackiceprog",
"tinyfpgab"
"tinyfpgab",
"tinyprog"
],
"external": "",
"develop": false
Expand Down
12 changes: 12 additions & 0 deletions app/resources/boards/TinyFPGA-BX/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"label": "TinyFPGA BX",
"datasheet": "https://github.com/tinyfpga/TinyFPGA-BX",
"interface": "Serial",
"FPGAResources": {
"ffs": 7680,
"luts": 7680,
"pios": 23,
"plbs": 960,
"brams": 32
}
}
1 change: 1 addition & 0 deletions app/resources/boards/TinyFPGA-BX/pinout.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"type": "inout", "name": "PIN_1", "value": "A2"}, {"type": "inout", "name": "PIN_2", "value": "A1"}, {"type": "inout", "name": "PIN_3", "value": "B1"}, {"type": "inout", "name": "PIN_4", "value": "C2"}, {"type": "inout", "name": "PIN_5", "value": "C1"}, {"type": "inout", "name": "PIN_6", "value": "D2"}, {"type": "inout", "name": "PIN_7", "value": "D1"}, {"type": "inout", "name": "PIN_8", "value": "E2"}, {"type": "inout", "name": "PIN_9", "value": "E1"}, {"type": "inout", "name": "PIN_10", "value": "G2"}, {"type": "inout", "name": "PIN_11", "value": "H1"}, {"type": "inout", "name": "PIN_12", "value": "J1"}, {"type": "inout", "name": "PIN_13", "value": "H2"}, {"type": "inout", "name": "PIN_14", "value": "H9"}, {"type": "inout", "name": "PIN_15", "value": "D9"}, {"type": "inout", "name": "PIN_16", "value": "D8"}, {"type": "inout", "name": "PIN_17", "value": "C9"}, {"type": "inout", "name": "PIN_18", "value": "A9"}, {"type": "inout", "name": "PIN_19", "value": "B8"}, {"type": "inout", "name": "PIN_20", "value": "A8"}, {"type": "inout", "name": "PIN_21", "value": "B7"}, {"type": "inout", "name": "PIN_22", "value": "A7"}, {"type": "inout", "name": "PIN_23", "value": "B6"}, {"type": "inout", "name": "PIN_24", "value": "A6"}, {"type": "inout", "name": "SPI_SS", "value": "F7"}, {"type": "inout", "name": "SPI_SCK", "value": "G7"}, {"type": "inout", "name": "SPI_IO0", "value": "G6"}, {"type": "inout", "name": "SPI_IO1", "value": "H7"}, {"type": "inout", "name": "SPI_IO2", "value": "H4"}, {"type": "inout", "name": "SPI_IO3", "value": "J8"}, {"type": "inout", "name": "PIN_25", "value": "G1"}, {"type": "inout", "name": "PIN_26", "value": "J3"}, {"type": "inout", "name": "PIN_27", "value": "J4"}, {"type": "inout", "name": "PIN_28", "value": "G9"}, {"type": "inout", "name": "PIN_29", "value": "J9"}, {"type": "inout", "name": "PIN_30", "value": "E8"}, {"type": "inout", "name": "PIN_31", "value": "J2"}, {"type": "inout", "name": "LED", "value": "B3"}, {"type": "inout", "name": "USBP", "value": "B4"}, {"type": "inout", "name": "USBN", "value": "A4"}, {"type": "inout", "name": "USBPU", "value": "A3"}, {"type": "input", "name": "CLK", "value": "B2"}]
64 changes: 64 additions & 0 deletions app/resources/boards/TinyFPGA-BX/pinout.pcf
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# -----------------------------------------------------------------------------
#- TinyFPGA BX constraint file (.pcf)
#- By Luke Valenty
#- May - 2018
#- GPLv3 license
# -----------------------------------------------------------------------------
#
# TinyFPGA BX information: https://github.com/tinyfpga/TinyFPGA-BX/

# -- Left side of board
set_io --warn-no-port PIN_1 A2
set_io --warn-no-port PIN_2 A1
set_io --warn-no-port PIN_3 B1
set_io --warn-no-port PIN_4 C2
set_io --warn-no-port PIN_5 C1
set_io --warn-no-port PIN_6 D2
set_io --warn-no-port PIN_7 D1
set_io --warn-no-port PIN_8 E2
set_io --warn-no-port PIN_9 E1
set_io --warn-no-port PIN_10 G2
set_io --warn-no-port PIN_11 H1
set_io --warn-no-port PIN_12 J1
set_io --warn-no-port PIN_13 H2

# -- Right side of board
set_io --warn-no-port PIN_14 H9
set_io --warn-no-port PIN_15 D9
set_io --warn-no-port PIN_16 D8
set_io --warn-no-port PIN_17 C9
set_io --warn-no-port PIN_18 A9
set_io --warn-no-port PIN_19 B8
set_io --warn-no-port PIN_20 A8
set_io --warn-no-port PIN_21 B7
set_io --warn-no-port PIN_22 A7
set_io --warn-no-port PIN_23 B6
set_io --warn-no-port PIN_24 A6

# -- SPI flash interface on bottom of board
set_io --warn-no-port SPI_SS F7
set_io --warn-no-port SPI_SCK G7
set_io --warn-no-port SPI_IO0 G6
set_io --warn-no-port SPI_IO1 H7
set_io --warn-no-port SPI_IO2 H4
set_io --warn-no-port SPI_IO3 J8

# -- General purpose pins on bottom of board
set_io --warn-no-port PIN_25 G1
set_io --warn-no-port PIN_26 J3
set_io --warn-no-port PIN_27 J4
set_io --warn-no-port PIN_28 G9
set_io --warn-no-port PIN_29 J9
set_io --warn-no-port PIN_30 E8
set_io --warn-no-port PIN_31 J2

# -- LED pin on bottom of board
set_io --warn-no-port LED B3

# -- USB pins on bottom of board
set_io --warn-no-port USBP B4
set_io --warn-no-port USBN A4
set_io --warn-no-port USBPU A3

# -- 16MHz clock pin on bottom of board
set_io --warn-no-port CLK B2 # input
8 changes: 8 additions & 0 deletions app/resources/boards/TinyFPGA-BX/rules.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"input" : [
{
"port" : "clk",
"pin": "B2"
}
]
}
2 changes: 2 additions & 0 deletions app/scripts/services/drivers.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ angular.module('icestudio')
rules += 'ATTRS{idVendor}==\\"0483\\", ATTRS{idProduct}==\\"5740\\", ENV{ID_MM_DEVICE_IGNORE}=\\"1\\"\n';
rules += '# Disable ModemManager for TinyFPGA B2\n';
rules += 'ATTRS{idVendor}==\\"1209\\", ATTRS{idProduct}==\\"2100\\", ENV{ID_MM_DEVICE_IGNORE}=\\"1\\"';
rules += '# Disable ModemManager for TinyFPGA BX\n';
rules += 'ATTRS{idVendor}==\\"1d50\\", ATTRS{idProduct}==\\"6130\\", ENV{ID_MM_DEVICE_IGNORE}=\\"1\\"';
configureLinuxDrivers([
'echo \'' + rules + '\' > /etc/udev/rules.d/80-fpga-serial.rules'
].concat(reloadRules()), function() {
Expand Down
1 change: 1 addition & 0 deletions app/scripts/services/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ angular.module('icestudio')
switch (common.selectedBoard.name) {
// TinyFPGA-B2 programmer errors
case 'TinyFPGA-B2':
case 'TinyFPGA-BX':
var match = stdout.match(/Bootloader\snot\sactive/g);
if (match && match.length === 3) {
resultAlert = alertify.error(gettextCatalog.getString('Bootloader not active'), 30);
Expand Down