Skip to content

Commit

Permalink
rm toolchain and drivers; replace apio with ICETool
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed Jan 28, 2022
1 parent 18fc61d commit d8a34d1
Show file tree
Hide file tree
Showing 14 changed files with 352 additions and 1,058 deletions.
45 changes: 42 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
<a title="'icestudio' workflow status" href="https://github.com/juanmard/icestudio/actions?query=workflow%3Aicestudio"><img alt="'icestudio' workflow status" src="https://img.shields.io/github/workflow/status/juanmard/icestudio/icestudio?longCache=true&style=flat-square&label=icestudio&logo=Github%20Actions&logoColor=fff"></a>
</p>

Visual editor for Verilog designs, built on top of [Icestorm](http://www.clifford.at/icestorm/) and
[Apio](https://github.com/FPGAwars/apio).
Visual editor for Verilog designs, built on top of [OSS CAD Suite](https://github.com/YosysHQ/oss-cad-suite-build).
Find installation guidelines, user guide and further information at
[juanmard.github.io/icestudio](https://juanmard.github.io/icestudio).

Expand All @@ -23,4 +22,44 @@ Find installation guidelines, user guide and further information at
<a title="Code Climate technical debt" href="https://codeclimate.com/github/juanmard/icestudio/trends/technical_debt"><img src="https://img.shields.io/codeclimate/tech-debt/juanmard/icestudio?longCache=true&style=flat-square&logo=codeclimate"></a>
</p>

**IMPORTANT: Since June 2021, several enhancements available in this variant are being applied [upstream](https://github.com/FPGAwars/icestudio). Therefore, the development of this fork is on hold until the dependencies are stabilized. Find further details in the [WIKI](https://github.com/juanmard/icestudio/wiki).**
**IMPORTANT: Since June 2021, several enhancements available in this variant are being applied [upstream](https://github.com/FPGAwars/icestudio). Find further details in the [WIKI](https://github.com/juanmard/icestudio/wiki).**

---

Unlike the [upstream](https://github.com/FPGAwars/icestudio), _Icestudio Nightly_ is agnostic to the toolchain
installation solution and it does not require admin/sudo permissions.
Users are free to choose between [OSS CAD Suite](https://github.com/YosysHQ/oss-cad-suite-build), system packages, Conda environments, [apio](https://github.com/FPGAwars/apio), [containers](https://hdl.github.io/containers/), etc. as their
preferred solution for getting the required tools and making them available in the PATH.
See [hdl/packages](https://github.com/hdl/packages).
By the same token, the usage of virtual environments is optional, although recommended when using Python based packaging
systems such as Conda or apio.

Furthermore, _Icestudio Nightly_ uses `ICETool` by default, instead of `apio`.
[ICETool](tools/ICETool) is a Python script that allows translating `verify`, `build` and `upload` commands from
Icestudio into the entrypoints provided by [FuseSoC](https://github.com/olofk/FuseSoC)/[Edalize](https://github.com/olofk/edalize/),
apio, or any other EDA workflow provider.
See [Electronic Design Automation Abstraction (EDA²)](https://edaa-org.github.io/).

Currently, ICETool is in an early development stage and it is not published through PyPI.
Therefore, the location of the script needs to be made available before starting Icestudio.

On GNU/Linux or MSYS2, add subdir `tools` to the PATH:

```sh
PATH=$(pwd)/tools:$PATH yarn start
```

On the Windows CMD, use PYTHONPATH:

```sh
PYTHONPATH=$(pwd)/tools:$PATH yarn start
```

Moreover, environment variable `ICETOOL_CMD` allows overriding the backend.

```sh
# Use apio
ICETOOL_CMD=apio PATH=$(pwd)/tools:$PATH yarn start
# Use edalize
ICETOOL_CMD=edalize PATH=$(pwd)/tools:$PATH yarn start
```
1 change: 0 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ angular
utils.selectBoard(_board);
}

tools.checkToolchain();
setTimeout(utils.endWait, 1500);
});

Expand Down
4 changes: 0 additions & 4 deletions controllers/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ angular
icon: 'snowflake-o',
title: 'UI Theme',
},
toolchain: {
icon: 'gear',
title: 'Toolchain',
},
};

$scope.done = () => {
Expand Down
1 change: 0 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Icestudio v1 (nightly)

quickstart/installation
quickstart/selectboard
quickstart/toolchain
quickstart/drivers
quickstart/test
quickstart/project
Expand Down
18 changes: 6 additions & 12 deletions docs/quickstart/drivers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,11 @@
Install/configure the drivers
-----------------------------

Then, for configuring drivers, connect your board and select **Enable** in *toolchain* section. This operation requires **administrator privileges**.
On Windows, an external application (`Zadig <https://zadig.akeo.ie/>`_) is used for boards with FTDI devices.
It replaces the existing FTDI driver of the **Interface 0** with **libusbK**.

.. attention::
.. image:: ../_static/img/zadig.png
:width: 500 px
:align: center

On Windows, an external application (`Zadig <https://zadig.akeo.ie/>`_) is used for boards with FTDI devices.
It replaces the existing FTDI driver of the **Interface 0** with **libusbK**.

.. image:: ../_static/img/zadig.png
:width: 500 px
:align: center

|
On macOS, this operation requires internet connection to allow *Homebrew* to install ``libffi`` and ``libftdi`` packages.
On macOS, this operation requires internet connection to allow *Homebrew* to install ``libffi`` and ``libftdi`` packages.
21 changes: 0 additions & 21 deletions docs/quickstart/toolchain.rst

This file was deleted.

1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
<script src="services/blocks.js"></script>
<script src="services/common.js"></script>
<script src="services/compiler.js"></script>
<script src="services/drivers.js"></script>
<script src="services/graph.js"></script>
<script src="services/project.js"></script>
<script src="services/collections.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "icestudio",
"version": "0.9.0dev",
"version": "0.12.0dev",
"sha": "00000000",
"description": "Visual editor for Verilog designs",
"repository": "https://github.com/juanmard/icestudio",
Expand Down
17 changes: 1 addition & 16 deletions services/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,25 +73,12 @@ angular
this.ICESTUDIO_DIR,
'collections'
);
this.APIO_HOME_DIR = nodePath.join(this.ICESTUDIO_DIR, 'apio');
const _PROFILE_PATH = nodePath.join(this.ICESTUDIO_DIR, 'profile.json');
this.PROFILE_PATH = _PROFILE_PATH;

this.APP_DIR = nodePath.dirname(process.execPath);

//-- Folder name for the virtual environment
this.ENV_DIR = nodePath.join(this.ICESTUDIO_DIR, 'venv');
this.ENV_BIN_DIR = nodePath.join(
this.ENV_DIR,
this.WIN32 && !this.MSYSTEM ? 'Scripts' : 'bin'
);
this.ENV_APIO = nodePath.join(
this.ENV_BIN_DIR,
this.WIN32 ? 'apio.exe' : 'apio'
);
this.APIO_CMD = this.WIN32
? `set APIO_HOME_DIR="${this.APIO_HOME_DIR}"& "${this.ENV_APIO}"`
: `export APIO_HOME_DIR="${this.APIO_HOME_DIR}"; "${this.ENV_APIO}"`;
this.ICETOOL = 'ICETool';

const nodeTmp = require('tmp');

Expand Down Expand Up @@ -198,8 +185,6 @@ angular
// Profile

const _data = {
apioRepo: 'juanmard/icestudio',
apioRef: 'apio-dev',
board: null,
prog: null,
boardRules: true,
Expand Down
12 changes: 7 additions & 5 deletions services/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -698,13 +698,15 @@ angular
code += module(data);
}

code += '\n';

// Dependencies modules
if (typeof project.package !== 'undefined') {
code += '\n/*-------------------------------------------------*/\n';
code += '/*-- ' + project.package.name + ' */\n';
code += '/*-- - - - - - - - - - - - - - - - - - - - - - - --*/\n';
code += '/*-- ' + project.package.description + '\n';
code += '/*-------------------------------------------------*/\n';
code += '//---------------------------------------------------\n';
code += '//-- ' + project.package.name + '\n';
code += '//-- - - - - - - - - - - - - - - - - - - - - - - - --\n';
code += '//-- ' + project.package.description + '\n';
code += '//---------------------------------------------------\n';
}
for (var d in dependencies) {
code += verilogCompiler(utils.digestId(d), dependencies[d]);
Expand Down
Loading

0 comments on commit d8a34d1

Please sign in to comment.