Skip to content

Commit 09fd41f

Browse files
committed
modules/zstd: Add buffer library
This commit adds a DSLX Buffer library that provides the Buffer struct, and helper functions that can be used to operate on it. The Buffer is meant to be a storage for data coming from the channel. It acts like a FIFO, allowing data of any length to be put in or popped out of it. Provided DSLX tests verify the correct behaviour of the library. Internal-tag: [#50221] Signed-off-by: Robert Winkler <[email protected]>
1 parent e223a40 commit 09fd41f

File tree

2 files changed

+403
-0
lines changed

2 files changed

+403
-0
lines changed

xls/modules/zstd/BUILD

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Copyright 2023 The XLS Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# Build rules for XLS ZSTD codec implementation.
16+
17+
load(
18+
"//xls/build_rules:xls_build_defs.bzl",
19+
"xls_dslx_library",
20+
"xls_dslx_test",
21+
)
22+
23+
package(
24+
default_applicable_licenses = ["//:license"],
25+
default_visibility = ["//xls:xls_users"],
26+
licenses = ["notice"],
27+
)
28+
29+
xls_dslx_library(
30+
name = "buffer_dslx",
31+
srcs = [
32+
"buffer.x",
33+
],
34+
)
35+
36+
xls_dslx_test(
37+
name = "buffer_dslx_test",
38+
dslx_test_args = {
39+
"compare": "none",
40+
},
41+
library = ":buffer_dslx",
42+
)

0 commit comments

Comments
 (0)