Skip to content

Commit

Permalink
Merge pull request #30 from ReconfigureIO/update/SMI-standard
Browse files Browse the repository at this point in the history
use SMI as standard
  • Loading branch information
Rosie Yohannan authored Aug 28, 2018
2 parents e1fe4e2 + 9f841e3 commit 94a2a71
Show file tree
Hide file tree
Showing 69 changed files with 222 additions and 8,921 deletions.
Binary file added addition/cmd/test-addition/test-addition
Binary file not shown.
7 changes: 4 additions & 3 deletions addition/glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion addition/glide.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package: .
import:
- package: github.com/ReconfigureIO/sdaccel
version: ~0.17.1
version: ~0.18.0
subpackages:
- axi/memory
- axi/protocol
- smi
- xcl
22 changes: 7 additions & 15 deletions addition/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ import (
// Import the entire framework for interracting with SDAccel from Go (including bundled verilog)
_ "github.com/ReconfigureIO/sdaccel"

// Use the new AXI protocol package for interracting with memory
aximemory "github.com/ReconfigureIO/sdaccel/axi/memory"
axiprotocol "github.com/ReconfigureIO/sdaccel/axi/protocol"
// Use the SMI protocol package
"github.com/ReconfigureIO/sdaccel/smi"
)

// function to add two uint32s
Expand All @@ -25,21 +24,14 @@ func Top(
b uint32,
addr uintptr,

// Set up channels for interacting with the shared memory
memReadAddr chan<- axiprotocol.Addr,
memReadData <-chan axiprotocol.ReadData,

memWriteAddr chan<- axiprotocol.Addr,
memWriteData chan<- axiprotocol.WriteData,
memWriteResp <-chan axiprotocol.WriteResp) {

// Since we're not reading anything from memory, disable those reads
go axiprotocol.ReadDisable(memReadAddr, memReadData)
// Set up channel to write result to shared memory
writeReq chan<- smi.Flit64,
writeResp <-chan smi.Flit64) {

// Add the two input integers together
val := Add(a, b)

// Write the result of the addition to the shared memory address provided by the host
aximemory.WriteUInt32(
memWriteAddr, memWriteData, memWriteResp, false, addr, val)
smi.WriteUInt32(
writeReq, writeResp, addr, smi.DefaultOptions, val)
}
5 changes: 4 additions & 1 deletion addition/vendor/github.com/ReconfigureIO/sdaccel/Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions addition/vendor/github.com/ReconfigureIO/sdaccel/xcl/fake.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions addition/vendor/github.com/ReconfigureIO/sdaccel/xcl/xcl.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 22 additions & 4 deletions addition/vendor/github.com/ReconfigureIO/sdaccel/xcl/xcl.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 0 additions & 27 deletions histogram-array-SMI/README.md

This file was deleted.

95 changes: 0 additions & 95 deletions histogram-array-SMI/cmd/test-histogram/main.go

This file was deleted.

9 changes: 0 additions & 9 deletions histogram-array-SMI/glide.lock

This file was deleted.

7 changes: 0 additions & 7 deletions histogram-array-SMI/glide.yaml

This file was deleted.

58 changes: 0 additions & 58 deletions histogram-array-SMI/main.go

This file was deleted.

17 changes: 0 additions & 17 deletions histogram-array-SMI/main_test.go

This file was deleted.

This file was deleted.

Loading

0 comments on commit 94a2a71

Please sign in to comment.