From 10ae95fac109e48ad97ef2a93a0ad68c8776a7ed Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Sun, 22 Sep 2024 15:30:05 -0700 Subject: [PATCH] add missing copyright headers --- .forgejo/workflows/test.yml | 2 ++ .gitignore | 4 +++- README.md | 4 ++++ crates/fayalite-proc-macros-impl/src/hdl_bundle.rs | 2 ++ crates/fayalite-proc-macros-impl/src/hdl_enum.rs | 2 ++ crates/fayalite-proc-macros-impl/src/hdl_type_common.rs | 2 ++ crates/fayalite/examples/blinky.rs | 2 ++ crates/fayalite/src/_docs.rs | 2 ++ crates/fayalite/src/_docs/modules.rs | 2 ++ crates/fayalite/src/_docs/modules/extern_module.rs | 2 ++ crates/fayalite/src/_docs/modules/module_bodies.rs | 2 ++ .../src/_docs/modules/module_bodies/hdl_array_expressions.rs | 2 ++ .../src/_docs/modules/module_bodies/hdl_if_statements.rs | 2 ++ .../src/_docs/modules/module_bodies/hdl_let_statements.rs | 2 ++ .../module_bodies/hdl_let_statements/inputs_outputs.rs | 2 ++ .../modules/module_bodies/hdl_let_statements/instances.rs | 2 ++ .../modules/module_bodies/hdl_let_statements/memories.rs | 2 ++ .../modules/module_bodies/hdl_let_statements/registers.rs | 2 ++ .../_docs/modules/module_bodies/hdl_let_statements/wires.rs | 2 ++ .../fayalite/src/_docs/modules/module_bodies/hdl_literals.rs | 2 ++ .../src/_docs/modules/module_bodies/hdl_match_statements.rs | 2 ++ .../modules/module_bodies/hdl_struct_variant_expressions.rs | 2 ++ crates/fayalite/src/_docs/modules/normal_module.rs | 2 ++ crates/fayalite/src/_docs/semantics.rs | 2 ++ crates/fayalite/src/_docs/semantics/connection_semantics.rs | 2 ++ crates/fayalite/src/cli.rs | 2 ++ crates/fayalite/src/expr/target.rs | 2 ++ crates/fayalite/src/prelude.rs | 2 ++ crates/fayalite/src/util/ready_valid.rs | 2 ++ crates/fayalite/src/util/scoped_ref.rs | 2 ++ crates/fayalite/visit_types.json | 4 ++++ 31 files changed, 67 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 088ca7c..df5f59c 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: LGPL-3.0-or-later +# See Notices.txt for copyright information on: [push, pull_request] jobs: diff --git a/.gitignore b/.gitignore index ccb5166..0655406 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ +# SPDX-License-Identifier: LGPL-3.0-or-later +# See Notices.txt for copyright information /target -.vscode \ No newline at end of file +.vscode diff --git a/README.md b/README.md index 6e14e9f..438550e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ + # Fayalite Fayalite is a library for designing digital hardware -- a hardware description language (HDL) embedded in the Rust programming language. Fayalite's semantics are based on [FIRRTL] as interpreted by [LLVM CIRCT](https://circt.llvm.org/docs/Dialects/FIRRTL/FIRRTLAnnotations/). diff --git a/crates/fayalite-proc-macros-impl/src/hdl_bundle.rs b/crates/fayalite-proc-macros-impl/src/hdl_bundle.rs index 7f7d626..30cf90f 100644 --- a/crates/fayalite-proc-macros-impl/src/hdl_bundle.rs +++ b/crates/fayalite-proc-macros-impl/src/hdl_bundle.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// See Notices.txt for copyright information use crate::{ hdl_type_common::{ common_derives, get_target, ItemOptions, MakeHdlTypeExpr, MaybeParsed, ParsedField, diff --git a/crates/fayalite-proc-macros-impl/src/hdl_enum.rs b/crates/fayalite-proc-macros-impl/src/hdl_enum.rs index d7e5b61..50fb138 100644 --- a/crates/fayalite-proc-macros-impl/src/hdl_enum.rs +++ b/crates/fayalite-proc-macros-impl/src/hdl_enum.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// See Notices.txt for copyright information use crate::{ hdl_type_common::{ common_derives, get_target, ItemOptions, MakeHdlTypeExpr, MaybeParsed, ParsedGenerics, diff --git a/crates/fayalite-proc-macros-impl/src/hdl_type_common.rs b/crates/fayalite-proc-macros-impl/src/hdl_type_common.rs index e33d0e0..efbe7f3 100644 --- a/crates/fayalite-proc-macros-impl/src/hdl_type_common.rs +++ b/crates/fayalite-proc-macros-impl/src/hdl_type_common.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// See Notices.txt for copyright information use crate::{fold::impl_fold, kw, Errors, HdlAttr, PairsIterExt}; use proc_macro2::{Span, TokenStream}; use quote::{format_ident, quote_spanned, ToTokens}; diff --git a/crates/fayalite/examples/blinky.rs b/crates/fayalite/examples/blinky.rs index 588ca9a..94c7910 100644 --- a/crates/fayalite/examples/blinky.rs +++ b/crates/fayalite/examples/blinky.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// See Notices.txt for copyright information use clap::Parser; use fayalite::{cli, prelude::*}; diff --git a/crates/fayalite/src/_docs.rs b/crates/fayalite/src/_docs.rs index 4d254a7..5b1888b 100644 --- a/crates/fayalite/src/_docs.rs +++ b/crates/fayalite/src/_docs.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// See Notices.txt for copyright information #![doc = include_str!("../README.md")] //! diff --git a/crates/fayalite/src/_docs/modules.rs b/crates/fayalite/src/_docs/modules.rs index c392f2e..99b98e8 100644 --- a/crates/fayalite/src/_docs/modules.rs +++ b/crates/fayalite/src/_docs/modules.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// See Notices.txt for copyright information //! # Fayalite Modules //! //! The [`#[hdl_module]`][`crate::hdl_module`] attribute is applied to a Rust diff --git a/crates/fayalite/src/_docs/modules/extern_module.rs b/crates/fayalite/src/_docs/modules/extern_module.rs index bf2034b..c1367d9 100644 --- a/crates/fayalite/src/_docs/modules/extern_module.rs +++ b/crates/fayalite/src/_docs/modules/extern_module.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// See Notices.txt for copyright information //! These are for when you want to use modules written in //! some other language, such as Verilog. //! diff --git a/crates/fayalite/src/_docs/modules/module_bodies.rs b/crates/fayalite/src/_docs/modules/module_bodies.rs index bd85c61..c12ae21 100644 --- a/crates/fayalite/src/_docs/modules/module_bodies.rs +++ b/crates/fayalite/src/_docs/modules/module_bodies.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// See Notices.txt for copyright information //! # Module Function Bodies //! //! The `#[hdl_module]` attribute lets you have statements/expressions with `#[hdl]` annotations diff --git a/crates/fayalite/src/_docs/modules/module_bodies/hdl_array_expressions.rs b/crates/fayalite/src/_docs/modules/module_bodies/hdl_array_expressions.rs index c4bbfa4..c0b15ad 100644 --- a/crates/fayalite/src/_docs/modules/module_bodies/hdl_array_expressions.rs +++ b/crates/fayalite/src/_docs/modules/module_bodies/hdl_array_expressions.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// See Notices.txt for copyright information //! # `#[hdl]` Array Expressions //! //! `#[hdl]` can be used on Array Expressions to construct an [`Array<[T; N]>`][type@Array] expression: diff --git a/crates/fayalite/src/_docs/modules/module_bodies/hdl_if_statements.rs b/crates/fayalite/src/_docs/modules/module_bodies/hdl_if_statements.rs index 46bb568..7d09943 100644 --- a/crates/fayalite/src/_docs/modules/module_bodies/hdl_if_statements.rs +++ b/crates/fayalite/src/_docs/modules/module_bodies/hdl_if_statements.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// See Notices.txt for copyright information //! # `#[hdl] if` Statements //! //! `#[hdl] if` statements behave similarly to Rust `if` statements, except they end up as muxes diff --git a/crates/fayalite/src/_docs/modules/module_bodies/hdl_let_statements.rs b/crates/fayalite/src/_docs/modules/module_bodies/hdl_let_statements.rs index c4e3e70..61d29b5 100644 --- a/crates/fayalite/src/_docs/modules/module_bodies/hdl_let_statements.rs +++ b/crates/fayalite/src/_docs/modules/module_bodies/hdl_let_statements.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// See Notices.txt for copyright information //! ## `#[hdl] let` statements pub mod inputs_outputs; diff --git a/crates/fayalite/src/_docs/modules/module_bodies/hdl_let_statements/inputs_outputs.rs b/crates/fayalite/src/_docs/modules/module_bodies/hdl_let_statements/inputs_outputs.rs index bfd7521..14169d9 100644 --- a/crates/fayalite/src/_docs/modules/module_bodies/hdl_let_statements/inputs_outputs.rs +++ b/crates/fayalite/src/_docs/modules/module_bodies/hdl_let_statements/inputs_outputs.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// See Notices.txt for copyright information //! ### Inputs/Outputs //! //! Inputs/Outputs create a Rust variable with type [`Expr`] where `T` is the type of the input/output. diff --git a/crates/fayalite/src/_docs/modules/module_bodies/hdl_let_statements/instances.rs b/crates/fayalite/src/_docs/modules/module_bodies/hdl_let_statements/instances.rs index 2776754..75def03 100644 --- a/crates/fayalite/src/_docs/modules/module_bodies/hdl_let_statements/instances.rs +++ b/crates/fayalite/src/_docs/modules/module_bodies/hdl_let_statements/instances.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// See Notices.txt for copyright information //! ### Module Instances //! //! module instances are kinda like the hardware equivalent of calling a function, diff --git a/crates/fayalite/src/_docs/modules/module_bodies/hdl_let_statements/memories.rs b/crates/fayalite/src/_docs/modules/module_bodies/hdl_let_statements/memories.rs index e491eef..ddd60b9 100644 --- a/crates/fayalite/src/_docs/modules/module_bodies/hdl_let_statements/memories.rs +++ b/crates/fayalite/src/_docs/modules/module_bodies/hdl_let_statements/memories.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// See Notices.txt for copyright information //! # Memories //! //! Memories are optimized for storing large amounts of data. diff --git a/crates/fayalite/src/_docs/modules/module_bodies/hdl_let_statements/registers.rs b/crates/fayalite/src/_docs/modules/module_bodies/hdl_let_statements/registers.rs index 28db27f..5a81c5b 100644 --- a/crates/fayalite/src/_docs/modules/module_bodies/hdl_let_statements/registers.rs +++ b/crates/fayalite/src/_docs/modules/module_bodies/hdl_let_statements/registers.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// See Notices.txt for copyright information //! ### Registers //! //! Registers are memory devices that will change their state only on a clock diff --git a/crates/fayalite/src/_docs/modules/module_bodies/hdl_let_statements/wires.rs b/crates/fayalite/src/_docs/modules/module_bodies/hdl_let_statements/wires.rs index b22e0fd..7d92b41 100644 --- a/crates/fayalite/src/_docs/modules/module_bodies/hdl_let_statements/wires.rs +++ b/crates/fayalite/src/_docs/modules/module_bodies/hdl_let_statements/wires.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// See Notices.txt for copyright information //! ### Wires //! //! Wires are kinda like variables, but unlike registers, diff --git a/crates/fayalite/src/_docs/modules/module_bodies/hdl_literals.rs b/crates/fayalite/src/_docs/modules/module_bodies/hdl_literals.rs index a6c9b58..91710e7 100644 --- a/crates/fayalite/src/_docs/modules/module_bodies/hdl_literals.rs +++ b/crates/fayalite/src/_docs/modules/module_bodies/hdl_literals.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// See Notices.txt for copyright information //! # `_hdl`-suffixed literals //! //! You can have integer literals with an arbitrary number of bits like so: diff --git a/crates/fayalite/src/_docs/modules/module_bodies/hdl_match_statements.rs b/crates/fayalite/src/_docs/modules/module_bodies/hdl_match_statements.rs index c0d4ea6..9e6c511 100644 --- a/crates/fayalite/src/_docs/modules/module_bodies/hdl_match_statements.rs +++ b/crates/fayalite/src/_docs/modules/module_bodies/hdl_match_statements.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// See Notices.txt for copyright information //! # `#[hdl] match` Statements //! //! `#[hdl] match` statements behave similarly to Rust `match` statements, except they end up as muxes diff --git a/crates/fayalite/src/_docs/modules/module_bodies/hdl_struct_variant_expressions.rs b/crates/fayalite/src/_docs/modules/module_bodies/hdl_struct_variant_expressions.rs index 9d63895..68cd685 100644 --- a/crates/fayalite/src/_docs/modules/module_bodies/hdl_struct_variant_expressions.rs +++ b/crates/fayalite/src/_docs/modules/module_bodies/hdl_struct_variant_expressions.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// See Notices.txt for copyright information //! # `#[hdl]` Struct/Variant Expressions //! //! Note: Structs are also known as [Bundles] when used in Fayalite, the Bundle name comes from [FIRRTL]. diff --git a/crates/fayalite/src/_docs/modules/normal_module.rs b/crates/fayalite/src/_docs/modules/normal_module.rs index f84678e..1267551 100644 --- a/crates/fayalite/src/_docs/modules/normal_module.rs +++ b/crates/fayalite/src/_docs/modules/normal_module.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// See Notices.txt for copyright information //! # Normal Modules //! //! See also: [Extern Modules][`super::extern_module`] diff --git a/crates/fayalite/src/_docs/semantics.rs b/crates/fayalite/src/_docs/semantics.rs index a499e8e..2282f25 100644 --- a/crates/fayalite/src/_docs/semantics.rs +++ b/crates/fayalite/src/_docs/semantics.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// See Notices.txt for copyright information //! # Fayalite Semantics //! //! Fayalite's semantics are based on [FIRRTL]. Due to their significance, some of the semantics are also documented here. diff --git a/crates/fayalite/src/_docs/semantics/connection_semantics.rs b/crates/fayalite/src/_docs/semantics/connection_semantics.rs index 41155bf..ba2a679 100644 --- a/crates/fayalite/src/_docs/semantics/connection_semantics.rs +++ b/crates/fayalite/src/_docs/semantics/connection_semantics.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// See Notices.txt for copyright information //! # Connection Semantics //! //! Fayalite's connection semantics are unlike assignments in software, so be careful! diff --git a/crates/fayalite/src/cli.rs b/crates/fayalite/src/cli.rs index f848d36..5071279 100644 --- a/crates/fayalite/src/cli.rs +++ b/crates/fayalite/src/cli.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// See Notices.txt for copyright information use crate::{ bundle::{Bundle, BundleType}, firrtl, diff --git a/crates/fayalite/src/expr/target.rs b/crates/fayalite/src/expr/target.rs index f33b286..0f85f62 100644 --- a/crates/fayalite/src/expr/target.rs +++ b/crates/fayalite/src/expr/target.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// See Notices.txt for copyright information use crate::{ array::Array, bundle::{Bundle, BundleField}, diff --git a/crates/fayalite/src/prelude.rs b/crates/fayalite/src/prelude.rs index bedece2..6a74e67 100644 --- a/crates/fayalite/src/prelude.rs +++ b/crates/fayalite/src/prelude.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// See Notices.txt for copyright information pub use crate::{ annotations::Annotation, array::{Array, ArrayType}, diff --git a/crates/fayalite/src/util/ready_valid.rs b/crates/fayalite/src/util/ready_valid.rs index a5893cf..ec761c2 100644 --- a/crates/fayalite/src/util/ready_valid.rs +++ b/crates/fayalite/src/util/ready_valid.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// See Notices.txt for copyright information use crate::prelude::*; #[hdl] diff --git a/crates/fayalite/src/util/scoped_ref.rs b/crates/fayalite/src/util/scoped_ref.rs index f168853..7705377 100644 --- a/crates/fayalite/src/util/scoped_ref.rs +++ b/crates/fayalite/src/util/scoped_ref.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// See Notices.txt for copyright information mod safety_boundary { use std::{cell::Cell, ptr::NonNull}; diff --git a/crates/fayalite/visit_types.json b/crates/fayalite/visit_types.json index 1748e47..ad9ed25 100644 --- a/crates/fayalite/visit_types.json +++ b/crates/fayalite/visit_types.json @@ -1,4 +1,8 @@ { + "license_header": [ + "SPDX-License-Identifier: LGPL-3.0-or-later", + "See Notices.txt for copyright information" + ], "types": { "Module": { "data": {