successfully interger in rocketchip
This commit is contained in:
55
.github/workflows/template-cleanup.yml
vendored
55
.github/workflows/template-cleanup.yml
vendored
@@ -1,55 +0,0 @@
|
|||||||
# Workflow to cleanup projects created from this template
|
|
||||||
# Adapted from workflow of the same name in https://github.com/JetBrains/intellij-platform-plugin-template
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
name: Template Cleanup
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
# Triggered on first push to repos created from the template
|
|
||||||
template-cleanup:
|
|
||||||
name: Template Cleanup
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.event.repository.name != 'chisel-template'
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Cleanup
|
|
||||||
run: |
|
|
||||||
export LC_CTYPE=C
|
|
||||||
export LANG=C
|
|
||||||
|
|
||||||
# Prepare variables
|
|
||||||
NAME="${GITHUB_REPOSITORY##*/}"
|
|
||||||
ORG="$GITHUB_REPOSITORY_OWNER"
|
|
||||||
SAFE_ORG=$(echo $ORG | sed 's/[^a-zA-Z0-9]//g' | tr '[:upper:]' '[:lower:]')
|
|
||||||
GROUP="com.github.$SAFE_ORG"
|
|
||||||
|
|
||||||
# Replace placeholders
|
|
||||||
sed -i "s/%NAME%/$NAME/g" build.sbt build.sc README.md
|
|
||||||
sed -i "s/%REPOSITORY%/${GITHUB_REPOSITORY/\//\\/}/g" README.md
|
|
||||||
sed -i "s/%ORGANIZATION%/$GROUP/g" build.sbt
|
|
||||||
|
|
||||||
# Remove lines marked with #REMOVE-ON-CLEANUP#
|
|
||||||
sed -i '/#REMOVE-ON-CLEANUP#/d' README.md
|
|
||||||
|
|
||||||
rm -rf \
|
|
||||||
.github/workflows/template-cleanup.yml \
|
|
||||||
LICENSE
|
|
||||||
|
|
||||||
- name: Commit
|
|
||||||
run: |
|
|
||||||
git config --local user.email "action@github.com"
|
|
||||||
git config --local user.name "GitHub Action"
|
|
||||||
git add .
|
|
||||||
git commit -m "Template cleanup"
|
|
||||||
|
|
||||||
- name: Push changes
|
|
||||||
uses: ad-m/github-push-action@v0.6.0
|
|
||||||
with:
|
|
||||||
branch: main
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
27
.github/workflows/test.yml
vendored
27
.github/workflows/test.yml
vendored
@@ -1,27 +0,0 @@
|
|||||||
name: Continuous Integration
|
|
||||||
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
ci:
|
|
||||||
name: ci
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Cleanup
|
|
||||||
run: sed -i "s/%NAME%/test/g" build.sc
|
|
||||||
- name: Setup Scala
|
|
||||||
uses: olafurpg/setup-scala@v10
|
|
||||||
with:
|
|
||||||
java-version: adopt@1.8
|
|
||||||
- name: Setup Mill
|
|
||||||
uses: jodersky/setup-mill@v0.2.3
|
|
||||||
with:
|
|
||||||
mill-version: 0.9.7
|
|
||||||
- name: Cache Scala
|
|
||||||
uses: coursier/cache-action@v5
|
|
||||||
- name: SBT Test
|
|
||||||
run: sbt test
|
|
||||||
- name: mill Test
|
|
||||||
run: mill _.test
|
|
||||||
@@ -15,11 +15,12 @@ class Mac(implicit p: Parameters) extends LazyModule with HasMacParameters{
|
|||||||
TLManagerNode(Seq(TLSlavePortParameters.v1(
|
TLManagerNode(Seq(TLSlavePortParameters.v1(
|
||||||
managers = Seq(TLSlaveParameters.v1(
|
managers = Seq(TLSlaveParameters.v1(
|
||||||
address = Seq(AddressSet(0x30000000L, 0x0FFFL)),
|
address = Seq(AddressSet(0x30000000L, 0x0FFFL)),
|
||||||
regionType = RegionType.UNCACHED,
|
regionType = RegionType.VOLATILE,
|
||||||
executable = false,
|
executable = false,
|
||||||
supportsGet = TransferSizes(32/8, 32/8),
|
fifoId = Some(2),
|
||||||
supportsPutFull = TransferSizes(32/8, 32/8),
|
supportsGet = TransferSizes(8/8, 32/8),
|
||||||
supportsPutPartial = TransferSizes(32/8, 32/8)
|
supportsPutFull = TransferSizes(8/8, 32/8),
|
||||||
|
supportsPutPartial = TransferSizes(8/8, 32/8)
|
||||||
)),
|
)),
|
||||||
beatBytes = 32/8)))
|
beatBytes = 32/8)))
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,36 @@
|
|||||||
package MAC
|
package MAC
|
||||||
|
|
||||||
import chisel3._
|
import chisel3._
|
||||||
import org.chipsalliance.cde.config.Field
|
|
||||||
import freechips.rocketchip.subsystem.BaseSubsystem
|
import freechips.rocketchip.subsystem.BaseSubsystem
|
||||||
import freechips.rocketchip.diplomacy.{LazyModule,BufferParams}
|
import freechips.rocketchip.diplomacy._
|
||||||
import freechips.rocketchip.tilelink.{TLBuffer, TLIdentityNode, TLWidthWidget, TLFragmenter}
|
import freechips.rocketchip.tilelink._
|
||||||
|
import org.chipsalliance.cde.config._
|
||||||
|
|
||||||
|
|
||||||
trait WithManyMacMix { this: BaseSubsystem =>
|
trait WithManyMacMix { this: BaseSubsystem =>
|
||||||
|
|
||||||
val mac = LazyModule(new Mac)
|
val mac0 = LazyModule(new Mac)
|
||||||
|
|
||||||
fbus.coupleFrom("mac_mst") { _ := TLBuffer() := mac.tlClientNode }
|
fbus.coupleFrom("mac_mst") { _ := TLBuffer() := mac0.tlClientNode }
|
||||||
pbus.coupleTo("mac_cfg") { mac.tlMasterNode := _ } //TLFragmenter(4, pbus.blockBytes) := TLWidthWidget(pbus.beatBytes) :=
|
pbus.coupleTo("mac_cfg") { mac0.tlMasterNode := TLFragmenter(pbus) := _ }
|
||||||
|
|
||||||
|
ibus.fromSync := mac0.int_node
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
trait WithManyMacMixModuleImp extends LazyModuleImp {
|
||||||
|
val outer: WithManyMacMix
|
||||||
|
|
||||||
|
val macIO = IO(new MacIO)
|
||||||
|
|
||||||
|
macIO <> outer.mac0.module.io
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class MacConfig() extends Config((site, here, up) => {
|
||||||
|
case MacParamsKey => MacSetting()
|
||||||
|
})
|
||||||
|
|
||||||
ibus.fromSync := mac.int_node
|
|
||||||
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user