-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
colinlin
committed
Jul 2, 2020
0 parents
commit abd219c
Showing
4 changed files
with
72 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Scratchip Binary CI | ||
language: generic | ||
env: | ||
- VER=3.3.2 MILL_VERSION=0.7.3 | ||
before_deploy: | ||
- curl --fail -L -o mill https://github.com/lihaoyi/mill/releases/download/$MILL_VERSION/$MILL_VERSION-assembly | ||
- chmod +x mill | ||
- wget https://github.com/freechipsproject/chisel3/archive/v$VER.zip | ||
- unzip v$VER.zip | ||
- cd chisel3-$VER | ||
- ../mill chisel3[2.12.11].assembly | ||
- mv out/chisel3/2.12.11/assembly/dest/out-tmp.jar chisel3-$VER.jar | ||
- cd .. | ||
- mkdir -p lib | ||
- cp chisel3-$VER/chisel3-$VER.jar lib | ||
- make verilog | ||
- tar czvf cache.tar.gz .cache | ||
deploy: | ||
provider: releases | ||
api_key: $GITHUB_TOKEN | ||
file: | ||
- lib/chisel3-$VER.jar | ||
- cache.tar.gz | ||
- mill | ||
skip_cleanup: true | ||
on: | ||
tags: true |
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,5 @@ | ||
export COURSIER_CACHE=.cache | ||
|
||
verilog: | ||
./mill chisel.run -td builds | ||
|
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,20 @@ | ||
import mill._, scalalib._ | ||
import ammonite.ops._ | ||
import java.nio.file.Paths | ||
|
||
object chisel extends ScalaModule { | ||
def scalaVersion = "2.12.6" | ||
def scalacOptions = Seq( | ||
"-Xsource:2.11", | ||
) | ||
def millSourcePath = super.millSourcePath / ammonite.ops.up | ||
|
||
def unmanagedClasspath = T { | ||
val lib_path = T.ctx.env.get("MILL_LIB") match { | ||
case Some(lib) => Path(Paths.get(lib).toAbsolutePath) | ||
case None => millSourcePath / "lib" | ||
} | ||
if (!ammonite.ops.exists(lib_path)) Agg() | ||
else Agg.from(ammonite.ops.ls(lib_path).map(PathRef(_))) | ||
} | ||
} |
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,20 @@ | ||
import chisel3._ | ||
import chisel3.util._ | ||
|
||
class Top extends Module { | ||
val io = IO(new Bundle{}) | ||
/** Define your code here | ||
* | ||
val io = IO(new Bundle{ | ||
val sel = Input(UInt(1.W)) | ||
val in0 = Input(UInt(1.W)) | ||
val in1 = Input(UInt(1.W)) | ||
val out = Output(UInt(1.W)) | ||
}) | ||
io.out := (io.sel & io.in1) | (~io.sel & io.in0) | ||
*/ | ||
} | ||
|
||
object Main extends App { | ||
Driver.execute(args, () => new Top) | ||
} |