From 29467c2d13eee4af48554f69c995148d54a47017 Mon Sep 17 00:00:00 2001 From: chetanyagoyal Date: Tue, 11 Jun 2024 20:35:07 +0530 Subject: [PATCH] add time signature and extensive license head --- .../convos/BiasVoltageGenerator.convo | 18 +++++++++++++++ .../llm/syntax_data/convos/CTATVGen.convo | 18 +++++++++++++++ .../convos/CascodeCommonGate.convo | 18 +++++++++++++++ .../CascodeCommonGateInterdigitated.convo | 18 +++++++++++++++ .../convos/CascodeCommonSource.convo | 18 +++++++++++++++ .../CascodeCommonSourceInterdigitated.convo | 18 +++++++++++++++ .../syntax_data/convos/ClassBPushPull.convo | 18 +++++++++++++++ .../convos/ClassBPushPullInterdigitated.convo | 18 +++++++++++++++ .../convos/CommonSourceAmplifier.convo | 18 +++++++++++++++ ...CommonSourceAmplifierFoldedDiodeLoad.convo | 18 +++++++++++++++ .../CommonSourceAmplifierWDiodeLoad.convo | 18 +++++++++++++++ .../convos/ConstBiasVoltageGen.convo | 18 +++++++++++++++ .../convos/CrossCoupledInverters.convo | 18 +++++++++++++++ .../convos/CurrentMirrorNtype.convo | 18 +++++++++++++++ .../CurrentMirrorNtypeInterdigitated.convo | 18 +++++++++++++++ .../convos/CurrentMirrorPtype.convo | 18 +++++++++++++++ .../CurrentMirrorPtypeInterdigitated.convo | 18 +++++++++++++++ .../syntax_data/convos/DegenCommonGate.convo | 18 +++++++++++++++ .../convos/DegenCommonSource.convo | 18 +++++++++++++++ .../llm/syntax_data/convos/DiffPair.convo | 18 +++++++++++++++ .../llm/syntax_data/convos/Inverter.convo | 18 +++++++++++++++ .../llm/syntax_data/convos/LowNoiseAmp.convo | 18 +++++++++++++++ .../glayout/llm/syntax_data/convos/NAND.convo | 18 +++++++++++++++ .../glayout/llm/syntax_data/convos/NOR.convo | 18 +++++++++++++++ .../syntax_data/convos/NoiseXDiffConv.convo | 18 +++++++++++++++ .../syntax_data/convos/PTATVoltageGen.convo | 18 +++++++++++++++ .../syntax_data/convos/RegulatedCascode.convo | 18 +++++++++++++++ .../llm/syntax_data/convos/SourceFollow.convo | 18 +++++++++++++++ .../syntax_data/convos/StrongArmLatch.convo | 18 +++++++++++++++ .../glayout/llm/syntax_data/convos/ULPD.convo | 18 +++++++++++++++ .../llm/syntax_data/convos/Varactor.convo | 18 +++++++++++++++ .../syntax_data/convos/VoltageFollower.convo | 18 +++++++++++++++ .../glayout/glayout/syntaxer/dynamic_load.py | 2 ++ .../glayout/glayout/syntaxer/process_input.py | 7 +++++- .../glayout/glayout/syntaxer/relational.py | 22 +++++++++++++++++-- 35 files changed, 604 insertions(+), 3 deletions(-) diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/BiasVoltageGenerator.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/BiasVoltageGenerator.convo index 09d8f305d..4e2bd283f 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/BiasVoltageGenerator.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/BiasVoltageGenerator.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# BiasVoltageGenerator # figure 24 exactly create a float parameter called src_width diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CTATVGen.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CTATVGen.convo index 475518a0e..82d1efb63 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CTATVGen.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CTATVGen.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# CTATVGen # CTAT without body effect create a float parameter called src_width diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CascodeCommonGate.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CascodeCommonGate.convo index eb70f719b..aed3f9df4 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CascodeCommonGate.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CascodeCommonGate.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# CascodeCommonGate # figure 12 exactly except output and input might be swapped create a float parameter called input_width diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CascodeCommonGateInterdigitated.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CascodeCommonGateInterdigitated.convo index cb3512d27..fed1b734a 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CascodeCommonGateInterdigitated.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CascodeCommonGateInterdigitated.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# CascodeCommonGateInterdigitated create a float parameter called width create a float parameter called length diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CascodeCommonSource.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CascodeCommonSource.convo index a7cf01331..e385b5ce1 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CascodeCommonSource.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CascodeCommonSource.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# CascodeCommonSource # figure 11 exactly (until gnd is implemented) create a float parameter called input_width diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CascodeCommonSourceInterdigitated.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CascodeCommonSourceInterdigitated.convo index 4031e0b25..89bbdaa30 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CascodeCommonSourceInterdigitated.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CascodeCommonSourceInterdigitated.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# CascodeCommonSourceInterdigitated create a float parameter called width create a float parameter called length diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/ClassBPushPull.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/ClassBPushPull.convo index 487bd53af..40cc3c749 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/ClassBPushPull.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/ClassBPushPull.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# ClassBPushPull # figure 19 exactly create a float parameter called supply_width diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/ClassBPushPullInterdigitated.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/ClassBPushPullInterdigitated.convo index edc26e76e..89ffb197b 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/ClassBPushPullInterdigitated.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/ClassBPushPullInterdigitated.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# ClassBPushPullInterdigitated create a float parameter called width create a float parameter called length diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CommonSourceAmplifier.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CommonSourceAmplifier.convo index 95629e89d..1ed67e152 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CommonSourceAmplifier.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CommonSourceAmplifier.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# CommonSourceAmplifier # figure 10 exactly, uses a pmos load and nmos amp create a float parameter called input_width diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CommonSourceAmplifierFoldedDiodeLoad.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CommonSourceAmplifierFoldedDiodeLoad.convo index 2cb23e036..8eee1b9f1 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CommonSourceAmplifierFoldedDiodeLoad.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CommonSourceAmplifierFoldedDiodeLoad.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# CommonSourceAmplifierFoldedDiodeLoad # figure 18 exactly create a float parameter called input_width diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CommonSourceAmplifierWDiodeLoad.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CommonSourceAmplifierWDiodeLoad.convo index 6fe85bfdc..e6a88436b 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CommonSourceAmplifierWDiodeLoad.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CommonSourceAmplifierWDiodeLoad.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# CommonSourceAmplifierWDiodeLoad # FIGURE 17 exactly: The common-source amplifier # with diode load is sometimes called a wideband amplifier due to its potentially highspeed operation diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/ConstBiasVoltageGen.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/ConstBiasVoltageGen.convo index 420fbe806..e9d8f4f43 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/ConstBiasVoltageGen.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/ConstBiasVoltageGen.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# ConstBiasVoltageGen # figure 25 exactly: CONSTANT bias voltage generator create a float parameter called source_width diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CrossCoupledInverters.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CrossCoupledInverters.convo index fb86cefac..918363879 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CrossCoupledInverters.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CrossCoupledInverters.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# CrossCoupledInverters # Create a float parameter called nfet_width # Create a float parameter called pfet_width diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CurrentMirrorNtype.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CurrentMirrorNtype.convo index df1c90a02..aaf3b87dd 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CurrentMirrorNtype.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CurrentMirrorNtype.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# CurrentMirrorNtype # ntype current mirror create a float parameter called reference_width diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CurrentMirrorNtypeInterdigitated.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CurrentMirrorNtypeInterdigitated.convo index 3e022e925..838a3749a 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CurrentMirrorNtypeInterdigitated.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CurrentMirrorNtypeInterdigitated.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# CurrentMirrorNtypeInterdigitated create a float parameter called width create a float parameter called length diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CurrentMirrorPtype.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CurrentMirrorPtype.convo index 809c270cb..632c86c4f 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CurrentMirrorPtype.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CurrentMirrorPtype.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# CurrentMirrorPtype # Todo rename stuff # ntype current mirror diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CurrentMirrorPtypeInterdigitated.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CurrentMirrorPtypeInterdigitated.convo index 60866460d..465d4a683 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CurrentMirrorPtypeInterdigitated.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/CurrentMirrorPtypeInterdigitated.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# CurrentMirrorPtypeInterdigitated create a float parameter called width create a float parameter called length diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/DegenCommonGate.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/DegenCommonGate.convo index 386bb53af..646d8cdad 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/DegenCommonGate.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/DegenCommonGate.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# DegenCommonGate # figure 21 # The degeneration of M1 can be adapted by tuning Vbias. diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/DegenCommonSource.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/DegenCommonSource.convo index 1b6d5c963..576ce116a 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/DegenCommonSource.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/DegenCommonSource.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# DegenCommonSource # figure 20 exactly create a float parameter called isrc_width diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/DiffPair.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/DiffPair.convo index 9dc88f98d..5fc568cb4 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/DiffPair.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/DiffPair.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# DiffPair create a float parameter called vin1_width create a float parameter called vin2_width diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/Inverter.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/Inverter.convo index 1f269df31..2b94bc599 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/Inverter.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/Inverter.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# Inverter # paramterize everything like an analog cell create a float parameter called pullup_width diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/LowNoiseAmp.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/LowNoiseAmp.convo index b892815f7..d4f6ecb7a 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/LowNoiseAmp.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/LowNoiseAmp.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# LowNoiseAmp # figure 23 exactly create a float parameter called input_width diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/NAND.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/NAND.convo index 8a102b08d..6b75a6048 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/NAND.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/NAND.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# NAND create a float parameter called pullup_width create a float parameter called pulldown_width diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/NOR.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/NOR.convo index 6822a59c1..dbfacb5fa 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/NOR.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/NOR.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# NOR create a float parameter called pullup_width create a float parameter called pulldown_width diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/NoiseXDiffConv.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/NoiseXDiffConv.convo index 1336c0b90..9d1adaf81 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/NoiseXDiffConv.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/NoiseXDiffConv.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# NoiseXDiffConv # figure 22 exactly # common gate into common source (give more descriptive name) diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/PTATVoltageGen.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/PTATVoltageGen.convo index 29f29250a..4e9339a69 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/PTATVoltageGen.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/PTATVoltageGen.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# PTATVoltageGen # figure 26 exactly create a float parameter called bias_width diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/RegulatedCascode.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/RegulatedCascode.convo index d8e8ee5c0..c4d29207d 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/RegulatedCascode.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/RegulatedCascode.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# RegulatedCascode # figure 48 create a float parameter called cascode_width diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/SourceFollow.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/SourceFollow.convo index d0b9316f9..edde541e3 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/SourceFollow.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/SourceFollow.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# SourceFollow # figure 9 exactly create a float parameter called srcfoll_width diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/StrongArmLatch.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/StrongArmLatch.convo index b55a1cc3f..8c2234771 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/StrongArmLatch.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/StrongArmLatch.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# StrongArmLatch import CrossCoupledInverters create a float parameter called bridge_width diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/ULPD.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/ULPD.convo index 51a04b0d8..7d91205e6 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/ULPD.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/ULPD.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# ULPD # ultra low power diode # figure 43 diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/Varactor.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/Varactor.convo index 9ffbf60e2..8d7bbafd5 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/Varactor.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/Varactor.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# Varactor # figure 30 variable capacitor create a float parameter called control_width diff --git a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/VoltageFollower.convo b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/VoltageFollower.convo index 47946627a..35e1f89b4 100644 --- a/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/VoltageFollower.convo +++ b/openfasoc/generators/glayout/glayout/llm/syntax_data/convos/VoltageFollower.convo @@ -1,3 +1,21 @@ +#### GLayout convo +# +# Copyright 2024 _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 2024-06-11 14:29:24.853093 +# VoltageFollower # figure 33 # tet stands for Transconductance Enhancement Transistor and gsc stands for Gate-Source Capacitance Transistor diff --git a/openfasoc/generators/glayout/glayout/syntaxer/dynamic_load.py b/openfasoc/generators/glayout/glayout/syntaxer/dynamic_load.py index df124a2c1..5ce0439c9 100644 --- a/openfasoc/generators/glayout/glayout/syntaxer/dynamic_load.py +++ b/openfasoc/generators/glayout/glayout/syntaxer/dynamic_load.py @@ -30,6 +30,8 @@ def reload_saved_convo(convo_file: Union[Path, str]) -> tuple: raise FileNotFoundError("load conversation should be from an existing file") with savedconvo.open("r") as loadconvo: lines = loadconvo.readlines() + # remove headmarker (18 lines long) + lines = lines[18:] for i, line in enumerate(lines): if i == 0: convo = glayout.syntaxer.process_input.Session(inputstream=sys.stdin, outputstream=sys.stdout, toplvlname=line) diff --git a/openfasoc/generators/glayout/glayout/syntaxer/process_input.py b/openfasoc/generators/glayout/glayout/syntaxer/process_input.py index 8c20cf204..b252f7602 100644 --- a/openfasoc/generators/glayout/glayout/syntaxer/process_input.py +++ b/openfasoc/generators/glayout/glayout/syntaxer/process_input.py @@ -2,6 +2,7 @@ import io from pathlib import Path from typing import Optional, Union +import datetime import nltk import glayout.syntaxer.nltk_init_deps @@ -112,9 +113,13 @@ def save_to_disk( savepath /= f"{self.code.toplvl_name}{suffix}" if savepath.parent.is_dir(): with savepath.open("w") as savefile: + output_code = self.code.get_code() + license = output_code.split("####", 3)[2] if savecode: - savefile.write(self.code.get_code()) + savefile.write(output_code) else: + self.code.HEAD_MARKER + savefile.writelines("#### GLayout convo" + license + f"# {datetime.datetime.now()}\n#\n") savefile.writelines([r + "\n" for r in self.conversation_responses]) else: raise FileNotFoundError("the directory you specfied does not exist") diff --git a/openfasoc/generators/glayout/glayout/syntaxer/relational.py b/openfasoc/generators/glayout/glayout/syntaxer/relational.py index 4b5a3fa26..efeb5843f 100644 --- a/openfasoc/generators/glayout/glayout/syntaxer/relational.py +++ b/openfasoc/generators/glayout/glayout/syntaxer/relational.py @@ -688,7 +688,25 @@ class GlayoutCode(GlayoutAction): """Stores all needed information to create Glayout code in relation tables GlayoutActions require some general context provided by the GlayoutCode class""" - HEAD_MARKER = "####\n# Compiled Glayout\n# Apache License\n# Version 2.0, January 2004\n# http://www.apache.org/licenses/" + HEAD_MARKER = license = f"""#### +# Compiled GLayout +#### +# +# Copyright {datetime.date.today().year} _insert_owner_name_ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +####""" # each table is implemented as a list of dictionaries def __init__(self, toplvl_name: str): @@ -821,7 +839,7 @@ def get_params_and_vars(self) -> list[str]: def get_code(self) -> str: # time this NLP was compiled to python code current_time = datetime.datetime.now() - compilation_head = self.HEAD_MARKER + f"\n# {current_time}\n\n" + compilation_head = self.HEAD_MARKER + f"\n# {current_time}\n####\n\n" # produce all import code import_code = "from glayout.flow.pdk.mappedpdk import MappedPDK\n" import_code += "from gdsfactory import Component\n"