Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frontend changes #6

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"files.watcherExclude": {
"**/target": true
}
}
Empty file added __init__.py
Empty file.
38 changes: 38 additions & 0 deletions backend/functional verification/verilog_2/funct.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import subprocess
import difflib

def run_verilog_simulation(verilog_file, output_file):
compile_command = f"iverilog -o simulation.out {verilog_file}"
subprocess.run(compile_command, shell=True, check=True)

run_command = f"vvp simulation.out > {output_file}"
subprocess.run(run_command, shell=True, check=True)

def compare_files_side_by_side(file1, file2, diff_file):
with open(file1, 'r') as f1, open(file2, 'r') as f2:
file1_lines = f1.readlines()
file2_lines = f2.readlines()

max_lines = max(len(file1_lines), len(file2_lines))

with open(diff_file, 'w') as df:
for i in range(max_lines):
line1 = file1_lines[i].strip() if i < len(file1_lines) else ""
line2 = file2_lines[i].strip() if i < len(file2_lines) else ""
df.write(f"Arche-v (line {i+1}): {line1}\n")
df.write(f"File (line {i+1}): {line2}\n")
df.write("\n")

def main():
verilog_file1 = "adder.v adder_tb.v"
verilog_file2 = "llm_adder.v adder_tb_llm.v"
output_file1 = "output1.txt"
output_file2 = "output2.txt"
diff_file = "diff.txt"

run_verilog_simulation(verilog_file1, output_file1)
run_verilog_simulation(verilog_file2, output_file2)
compare_files_side_by_side(output_file1, output_file2, diff_file)

if __name__ == "__main__":
main()
20 changes: 20 additions & 0 deletions frontend/web/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab
indent_size = 4
tab_width = 4

[*.{json,txt,js}]
indent_style = space
indent_size = 2

[*.txt]
end_of_line = crlf
3 changes: 3 additions & 0 deletions frontend/web/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "standard"
}
170 changes: 170 additions & 0 deletions frontend/web/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
# Created by https://www.gitignore.io/api/node,sublimetext,windows,macos,sass

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless

### Sass ###
.sass-cache/
*.css.map
*.sass.map
*.scss.map

### SublimeText ###
# Cache files for Sublime Text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache

# Workspace files are user-specific
*.sublime-workspace

# Project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using Sublime Text
# *.sublime-project

# SFTP configuration file
sftp-config.json

# Package control specific files
Package Control.last-run
Package Control.ca-list
Package Control.ca-bundle
Package Control.system-ca-bundle
Package Control.cache/
Package Control.ca-certs/
Package Control.merged-ca-bundle
Package Control.user-ca-bundle
oscrypto-ca-bundle.crt
bh_unicode_properties.cache

# Sublime-github package stores a github token in this file
# https://packagecontrol.io/packages/sublime-github
GitHub.sublime-settings

### Windows ###
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk


# End of https://www.gitignore.io/api/node,sublimetext,windows,macos,sass
8 changes: 8 additions & 0 deletions frontend/web/.stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"rules": {
"block-no-empty": true,
"color-hex-case": "lower",
"color-hex-length": "short",
"color-no-invalid-hex": true,
"declaration-colon-space-after": "always",
"max-empty-lines": 2
}
2 changes: 2 additions & 0 deletions frontend/web/_first-steps.url
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[InternetShortcut]
URL=https://designmodo.com/slides/first-steps/
2 changes: 2 additions & 0 deletions frontend/web/_open-generator.url
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[InternetShortcut]
URL=https://designmodo.com/slides/app/
Loading
Loading