Skip to content

Commit 32dbedd

Browse files
rw1nklerlpawelcz
authored andcommitted
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 b06e54a commit 32dbedd

File tree

2 files changed

+400
-0
lines changed

2 files changed

+400
-0
lines changed

xls/modules/zstd/BUILD

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
library = ":buffer_dslx",
39+
)

0 commit comments

Comments
 (0)