-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #263 from abs-tudelft/write-response-channel
Add write response channel & synchronization support
- Loading branch information
Showing
39 changed files
with
1,373 additions
and
412 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
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
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
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
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
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
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,21 @@ | ||
import pyarrow as pa | ||
|
||
# Create a field that can be interpreted as a "listprim" ArrayReader/Writer | ||
input_schema = pa.schema([pa.field('A', pa.int8(), nullable=False), | ||
pa.field('B', pa.int8(), nullable=False)]) | ||
input_schema = input_schema.with_metadata({b'fletcher_mode': b'read', b'fletcher_name': b'R'}) | ||
|
||
output_schema = pa.schema([pa.field('C', pa.int8(), nullable=False), | ||
pa.field('D', pa.int8(), nullable=False)]) | ||
output_schema = output_schema.with_metadata({b'fletcher_mode': b'write', b'fletcher_name': b'W'}) | ||
|
||
batch_data = [pa.array([1, -3, 3, -7], pa.int8()), | ||
pa.array([4, 2, -6, -9], pa.int8())] | ||
|
||
input_batch = pa.RecordBatch.from_arrays(batch_data, schema=input_schema) | ||
writer_in = pa.RecordBatchFileWriter('in.rb', input_schema) | ||
writer_in.write(input_batch) | ||
writer_in.close() | ||
|
||
serialized_out_schema = output_schema.serialize() | ||
pa.output_stream('out.as').write(serialized_out_schema) |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,11 @@ | ||
work | ||
vsim.wlf | ||
transcript | ||
dot/ | ||
vhdmmio-doc/ | ||
*.gen.* | ||
fletchgen.mmio.yaml | ||
memory.srec | ||
vhdmmio.log | ||
in.rb | ||
out.as |
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,18 @@ | ||
import pyarrow as pa | ||
|
||
# Input schema and batch | ||
in_schema = pa.schema([pa.field('number', pa.int64(), nullable=False)]) | ||
in_schema = in_schema.with_metadata({b'fletcher_mode': b'read', | ||
b'fletcher_name': b'in'}) | ||
in_data = [pa.array([1, -3, 3, -7])] | ||
in_batch = pa.RecordBatch.from_arrays(in_data, schema=in_schema) | ||
# Create an Arrow RecordBatchFileWriter. | ||
writer = pa.RecordBatchFileWriter('in.rb', in_schema) | ||
writer.write(in_batch) | ||
writer.close() | ||
|
||
# Output schema and batch | ||
out_schema = pa.schema([pa.field('number', pa.int64(), nullable=False)]) | ||
out_schema = out_schema.with_metadata({b'fletcher_mode': b'write', | ||
b'fletcher_name': b'out'}) | ||
pa.output_stream('out.as').write(out_schema.serialize()) |
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
File renamed without changes.
Oops, something went wrong.