Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tapasco
tapasco
Commits
4531adea
Commit
4531adea
authored
Jul 07, 2017
by
Jens Korinth
Browse files
Update to Chisel 3.0 (SNAPSHOT)
parent
99804e52
Changes
5
Hide whitespace changes
Inline
Side-by-side
.gitignore
0 → 100644
View file @
4531adea
### Project Specific stuff
test_run_dir/*
### XilinxISE template
# intermediate build files
*.bgn
*.bit
*.bld
*.cmd_log
*.drc
*.ll
*.lso
*.msd
*.msk
*.ncd
*.ngc
*.ngd
*.ngr
*.pad
*.par
*.pcf
*.prj
*.ptwx
*.rbb
*.rbd
*.stx
*.syr
*.twr
*.twx
*.unroutes
*.ut
*.xpi
*.xst
*_bitgen.xwbt
*_envsettings.html
*_map.map
*_map.mrp
*_map.ngm
*_map.xrpt
*_ngdbuild.xrpt
*_pad.csv
*_pad.txt
*_par.xrpt
*_summary.html
*_summary.xml
*_usage.xml
*_xst.xrpt
# project-wide generated files
*.gise
par_usage_statistics.html
usage_statistics_webtalk.html
webtalk.log
webtalk_pn.xml
# generated folders
iseconfig/
xlnx_auto_0_xdb/
xst/
_ngo/
_xmsgs/
### Eclipse template
*.pydevproject
.metadata
.gradle
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
# Eclipse Core
.project
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# CDT-specific
.cproject
# JDT-specific (Eclipse Java Development Tools)
.classpath
# Java annotation processor (APT)
.factorypath
# PDT-specific
.buildpath
# sbteclipse plugin
.target
# TeXlipse plugin
.texlipse
### C template
# Object files
*.o
*.ko
*.obj
*.elf
# Precompiled Headers
*.gch
*.pch
# Libraries
*.lib
*.a
*.la
*.lo
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
# Debug files
*.dSYM/
### SBT template
# Simple Build Tool
# http://www.scala-sbt.org/release/docs/Getting-Started/Directories.html#configuring-version-control
target/
lib_managed/
src_managed/
project/boot/
.history
.cache
### Emacs template
# -*- mode: gitignore; -*-
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*
# Org-mode
.org-id-locations
*_archive
# flymake-mode
*_flymake.*
# eshell files
/eshell/history
/eshell/lastdir
# elpa packages
/elpa/
# reftex files
*.rel
# AUCTeX auto folder
/auto/
# cask packages
.cask/
### Vim template
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
*.un~
Session.vim
.netrwhist
*~
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
*.iml
## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:
# User-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# .idea/dictionaries
# Sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml
# .idea/uiDesigner.xml
# Gradle:
# .idea/gradle.xml
# .idea/libraries
# Mongo Explorer plugin:
# .idea/mongoSettings.xml
## File-based project format:
*.ipr
*.iws
## Plugin-specific files:
# IntelliJ
/out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
### C++ template
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
### OSX template
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### Xcode template
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## Build generated
build/
DerivedData
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
## Other
*.xccheckout
*.moved-aside
*.xcuserstate
### Scala template
*.class
*.log
# sbt specific
.cache
.history
.lib/
dist/*
target/
lib_managed/
src_managed/
project/boot/
project/plugins/project/
# Scala-IDE specific
.scala_dependencies
.worksheet
### Java template
*.class
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.ear
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
CoreDefinition.scala
View file @
4531adea
package
chisel.packaging
import
scala.io.Source
import
play.api.libs.json._
import
play.api.libs.functional.syntax._
import
C
hisel.Module
import
scala.io.Source
import
play.api.libs.json._
import
play.api.libs.functional.syntax._
import
c
hisel
3
.Module
/**
* Basic definition of a core for IP-XACT packaging.
...
...
ModuleBuilder.scala
View file @
4531adea
package
chisel.packaging
import
C
hisel._
import
scala.sys.process._
import
c
hisel
3
._
import
scala.sys.process._
/**
* Abstract IP-XACT builder class:
...
...
@@ -11,7 +11,7 @@ import scala.sys.process._
* (default: ./packaging)
**/
abstract
class
ModuleBuilder
(
packagingDir
:
String
=
"packaging"
)
{
val
chiselArgs
=
Array
(
"--backend"
,
"v"
,
"--compile"
)
val
chiselArgs
=
Array
[
String
](
)
val
modules
:
List
[(()
=>
Module
,
CoreDefinition
)]
def
main
(
args
:
Array
[
String
])
{
...
...
@@ -19,7 +19,7 @@ abstract class ModuleBuilder(packagingDir: String = "packaging") {
val
fm
=
modules
filter
(
m
=>
args
.
length
==
0
||
args
.
map
(
_
.
toLowerCase
).
contains
(
m
.
_2
.
name
.
toLowerCase
))
assert
(
fm
.
length
>
0
,
"no matching cores found for: "
+
args
.
mkString
(
", "
))
fm
foreach
{
m
=>
chiselMain
(
chiselArgs
++
Array
(
"--target
D
ir"
,
m
.
_2
.
root
),
m
.
_1
)
Driver
.
execute
(
chiselArgs
++
Array
(
"--target
-d
ir"
,
m
.
_2
.
root
),
m
.
_1
)
m
.
_2
.
postBuildActions
map
(
fn
=>
fn
.
apply
(
m
.
_1
()))
val
json
=
"%s/%s.json"
.
format
(
m
.
_2
.
root
,
m
.
_2
.
name
)
m
.
_2
.
write
(
json
)
...
...
build.sbt
View file @
4531adea
...
...
@@ -8,8 +8,19 @@ scalaVersion := "2.11.0"
crossScalaVersions
:=
Seq
(
"2.10.3"
,
"2.10.4"
,
"2.11.0"
)
resolvers
++=
Seq
(
Resolver
.
sonatypeRepo
(
"snapshots"
),
Resolver
.
sonatypeRepo
(
"releases"
)
)
// Provide a managed dependency on X if -DXVersion="" is supplied on the command line.
val
defaultVersions
=
Map
(
"chisel3"
->
"3.0-SNAPSHOT"
,
"chisel-iotesters"
->
"1.1-SNAPSHOT"
)
libraryDependencies
++=
(
Seq
(
"chisel3"
,
"chisel-iotesters"
).
map
{
dep
:
String
=>
"edu.berkeley.cs"
%%
dep
%
sys
.
props
.
getOrElse
(
dep
+
"Version"
,
defaultVersions
(
dep
))
})
libraryDependencies
++=
Seq
(
"edu.berkeley.cs"
%%
"chisel"
%
"latest.release"
,
"com.typesafe.play"
%%
"play-json"
%
"2.4.8"
)
example/ModuleBuilderTest.scala
0 → 100644
View file @
4531adea
package
chisel.packaging
import
chisel3._
import
CoreDefinition._
object
ModuleBuilderTest
extends
ModuleBuilder
(
"."
)
{
private
object
TestModule
extends
Module
{
val
io
=
IO
(
new
Bundle
)
}
val
modules
:
List
[(()
=>
Module
,
CoreDefinition
)]
=
List
(
(
// test module
()
=>
TestModule
,
CoreDefinition
(
name
=
"TestModule"
,
vendor
=
"esa.cs.tu-darmstadt.de"
,
library
=
"chisel"
,
version
=
"1.0"
,
root
(
"TestModule"
)
)
)
)
}
Jens Korinth
@jk
mentioned in commit
17f0d672
·
Mar 05, 2018
mentioned in commit
17f0d672
mentioned in commit 17f0d67240ebf5d7e1d0be9162d272b04256c47d
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment