From 010d019bcf3461e1e86ea030308d62f3ede77900 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 1 Sep 2025 22:58:44 +0000 Subject: [PATCH 1/2] Initial plan From 704a8c73b37332edd9b1f3edf23d6a8a817908ef Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 1 Sep 2025 23:05:10 +0000 Subject: [PATCH 2/2] Add comprehensive Google Forms prerequisite survey with automation tools Co-authored-by: FCHXWH823 <176723341+FCHXWH823@users.noreply.github.com> --- .gitignore | 56 ++++ LLM4ChipDesign_Prerequisite_Survey.md | 353 ++++++++++++++++++++++++++ QUICK_START.md | 66 +++++ README.md | 12 + README_Survey.md | 165 ++++++++++++ create_google_form.py | 328 ++++++++++++++++++++++++ google_forms_structure.json | 259 +++++++++++++++++++ manual_creation_instructions.txt | 55 ++++ survey_response_template.csv | 2 + 9 files changed, 1296 insertions(+) create mode 100644 .gitignore create mode 100644 LLM4ChipDesign_Prerequisite_Survey.md create mode 100644 QUICK_START.md create mode 100644 README_Survey.md create mode 100644 create_google_form.py create mode 100644 google_forms_structure.json create mode 100644 manual_creation_instructions.txt create mode 100644 survey_response_template.csv diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cfe63be --- /dev/null +++ b/.gitignore @@ -0,0 +1,56 @@ +# Google API credentials and tokens +credentials.json +token.json + +# Survey response data +responses.csv +survey_data_*.csv +survey_responses_*.xlsx + +# Python cache and temporary files +__pycache__/ +*.py[cod] +*$py.class +*.so +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg + +# Virtual environment +venv/ +env/ +ENV/ + +# IDE files +.vscode/ +.idea/ +*.swp +*.swo + +# OS generated files +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# Temporary files +*.tmp +*.temp +temp/ +tmp/ \ No newline at end of file diff --git a/LLM4ChipDesign_Prerequisite_Survey.md b/LLM4ChipDesign_Prerequisite_Survey.md new file mode 100644 index 0000000..8e134e9 --- /dev/null +++ b/LLM4ChipDesign_Prerequisite_Survey.md @@ -0,0 +1,353 @@ +# LLM4ChipDesign Prerequisite Survey + +## Instructions for Google Forms Creation + +This survey is designed to assess participants' background knowledge for the LLM4ChipDesign course/workshop. The questions are structured to be easily transferred to Google Forms with appropriate question types specified. + +### Google Forms Setup Instructions: +1. Go to [Google Forms](https://forms.google.com) +2. Create a new form titled "LLM4ChipDesign Prerequisite Survey" +3. Add a description explaining the purpose of the survey +4. Copy each question below with the specified question type +5. Configure response collection to save to a Google Sheet for easy analysis + +--- + +## Survey Questions + +### Section 1: Personal Information +**Question Type: Short Answer** + +1. **Name (Optional)** + - Question Type: Short Answer Text + - Required: No + +2. **Email Address** + - Question Type: Short Answer Text + - Required: Yes + +3. **Institution/Organization** + - Question Type: Short Answer Text + - Required: Yes + +4. **Current Role/Position** + - Question Type: Multiple Choice + - Options: + - Undergraduate Student + - Graduate Student (Master's) + - Graduate Student (PhD) + - Research Scientist + - Industry Engineer + - Faculty/Professor + - Other + +### Section 2: Educational Background +**Question Type: Multiple Choice** + +5. **What is your highest level of education?** + - Question Type: Multiple Choice + - Options: + - High School + - Bachelor's Degree + - Master's Degree + - PhD + - Other + +6. **What is your primary field of study/expertise?** + - Question Type: Multiple Choice + - Options: + - Computer Science + - Electrical Engineering + - Computer Engineering + - Mathematics/Statistics + - Physics + - Other Engineering + - Other + +### Section 3: Hardware Design Experience +**Question Type: Multiple Choice** + +7. **Rate your experience with Hardware Description Languages (HDLs)** + - Question Type: Multiple Choice + - Options: + - No experience + - Beginner (basic syntax knowledge) + - Intermediate (can write simple modules) + - Advanced (can design complex systems) + - Expert (professional level) + +8. **Which Hardware Description Languages have you used? (Select all that apply)** + - Question Type: Checkboxes + - Options: + - Verilog + - SystemVerilog + - VHDL + - Chisel + - SpinalHDL + - None + - Other + +9. **Rate your experience with digital circuit design** + - Question Type: Multiple Choice + - Options: + - No experience + - Beginner (basic logic gates) + - Intermediate (combinational and sequential circuits) + - Advanced (complex digital systems) + - Expert (professional level) + +10. **Have you worked with Electronic Design Automation (EDA) tools?** + - Question Type: Checkboxes + - Options: + - Xilinx Vivado + - Intel Quartus + - Cadence tools + - Synopsys tools + - ModelSim/QuestaSim + - Open-source tools (Yosys, etc.) + - None + - Other + +### Section 4: Verification and Testing Experience +**Question Type: Multiple Choice** + +11. **Rate your experience with hardware verification** + - Question Type: Multiple Choice + - Options: + - No experience + - Beginner (basic testbenches) + - Intermediate (SystemVerilog assertions, coverage) + - Advanced (formal verification, UVM) + - Expert (professional level) + +12. **Which verification methodologies have you used? (Select all that apply)** + - Question Type: Checkboxes + - Options: + - Testbench-based simulation + - SystemVerilog Assertions (SVA) + - Universal Verification Methodology (UVM) + - Formal verification + - Coverage-driven verification + - Constrained random testing + - None + - Other + +13. **Rate your experience with testbench generation** + - Question Type: Multiple Choice + - Options: + - No experience + - Beginner (simple test vectors) + - Intermediate (structured testbenches) + - Advanced (automated test generation) + - Expert (professional level) + +### Section 5: Programming Experience +**Question Type: Multiple Choice** + +14. **Rate your programming experience** + - Question Type: Multiple Choice + - Options: + - No experience + - Beginner (basic syntax) + - Intermediate (can write programs) + - Advanced (complex applications) + - Expert (professional level) + +15. **Which programming languages are you proficient in? (Select all that apply)** + - Question Type: Checkboxes + - Options: + - Python + - C/C++ + - Java + - JavaScript + - MATLAB + - R + - Scala + - Go + - Rust + - Other + +16. **Rate your experience with software-to-hardware design (HLS)** + - Question Type: Multiple Choice + - Options: + - No experience + - Beginner (basic concepts) + - Intermediate (used HLS tools) + - Advanced (optimized HLS designs) + - Expert (professional level) + +### Section 6: Machine Learning and AI Experience +**Question Type: Multiple Choice** + +17. **Rate your experience with Machine Learning** + - Question Type: Multiple Choice + - Options: + - No experience + - Beginner (basic concepts) + - Intermediate (implemented models) + - Advanced (research/professional work) + - Expert (ML researcher/engineer) + +18. **Rate your experience with Large Language Models (LLMs)** + - Question Type: Multiple Choice + - Options: + - No experience + - Beginner (used ChatGPT/similar tools) + - Intermediate (fine-tuning, prompt engineering) + - Advanced (LLM research/development) + - Expert (LLM specialist) + +19. **Which AI/ML frameworks have you used? (Select all that apply)** + - Question Type: Checkboxes + - Options: + - TensorFlow + - PyTorch + - Hugging Face Transformers + - OpenAI API + - scikit-learn + - JAX + - None + - Other + +20. **Have you used LLMs for code generation?** + - Question Type: Multiple Choice + - Options: + - Never + - Occasionally for simple tasks + - Regularly for various programming tasks + - Extensively for complex projects + - Research/professional work in AI-assisted coding + +### Section 7: Specific Knowledge Areas +**Question Type: Multiple Choice** + +21. **Rate your knowledge of Conjunctive Normal Form (CNF)** + - Question Type: Multiple Choice + - Options: + - No knowledge + - Basic understanding + - Can work with CNF expressions + - Advanced knowledge + - Expert level + +22. **Rate your knowledge of prefix circuits and adders** + - Question Type: Multiple Choice + - Options: + - No knowledge + - Basic understanding + - Can design simple adders + - Advanced knowledge of prefix structures + - Expert level + +23. **Rate your knowledge of finite state machines (FSMs)** + - Question Type: Multiple Choice + - Options: + - No knowledge + - Basic understanding + - Can design and implement FSMs + - Advanced FSM design and verification + - Expert level + +24. **Rate your knowledge of SPICE and analog circuit simulation** + - Question Type: Multiple Choice + - Options: + - No knowledge + - Basic understanding + - Can work with SPICE netlists + - Advanced analog design knowledge + - Expert level + +### Section 8: Research and Security +**Question Type: Multiple Choice** + +25. **Rate your knowledge of hardware security** + - Question Type: Multiple Choice + - Options: + - No knowledge + - Basic understanding + - Some experience with security concepts + - Advanced knowledge + - Expert level + +26. **Are you familiar with IP piracy and hardware security threats?** + - Question Type: Multiple Choice + - Options: + - Not familiar + - Basic awareness + - Some knowledge + - Well-informed + - Expert knowledge + +27. **Rate your experience with research methodology** + - Question Type: Multiple Choice + - Options: + - No experience + - Basic understanding + - Some research experience + - Experienced researcher + - Professional researcher + +### Section 9: Goals and Expectations +**Question Type: Long Answer** + +28. **What do you hope to learn from the LLM4ChipDesign course/workshop?** + - Question Type: Paragraph Text + - Required: Yes + +29. **Which specific topics are you most interested in? (Select all that apply)** + - Question Type: Checkboxes + - Options: + - AutoChip (Verilog generation with feedback) + - VeriThoughts (reasoning-based Verilog generation) + - ROME (hierarchical prompting) + - Veritas (CNF-guided synthesis) + - PrefixLLM (prefix circuit design) + - Testbench generation for FSMs + - Natural language to SystemVerilog assertions + - Hardware security and IP piracy + - Software-to-hardware design (C2HLSC) + - Analog circuit design (Masala-CHAI) + - All topics + +30. **Do you have any specific projects or applications in mind where you might apply these techniques?** + - Question Type: Paragraph Text + - Required: No + +### Section 10: Additional Information +**Question Type: Long Answer** + +31. **Please share any additional relevant experience or background that might be helpful for us to know** + - Question Type: Paragraph Text + - Required: No + +32. **Do you have any questions or concerns about the course content or prerequisites?** + - Question Type: Paragraph Text + - Required: No + +--- + +## Google Forms Configuration Notes + +### Response Settings: +- Collect email addresses: Yes +- Limit to 1 response per person: Recommended +- Allow response editing: Yes +- Show progress bar: Yes +- Shuffle question order: No (maintain logical flow) + +### Data Collection: +- Responses will be automatically saved to a Google Sheet +- Set up email notifications for new responses if desired +- Consider creating response summary for quick analysis + +### Sharing: +- Share link with participants +- Can be embedded in websites or sent via email +- Consider creating a QR code for easy access during events + +### Analysis: +- Use Google Sheets for detailed analysis +- Google Forms provides automatic summary charts +- Export data for advanced statistical analysis if needed + +This survey structure allows for comprehensive assessment of participant backgrounds while being easily implementable in Google Forms with automated data collection and analysis capabilities. \ No newline at end of file diff --git a/QUICK_START.md b/QUICK_START.md new file mode 100644 index 0000000..969fc02 --- /dev/null +++ b/QUICK_START.md @@ -0,0 +1,66 @@ +# Quick Reference: Google Forms Creation + +## 🚀 5-Minute Setup + +### Step 1: Create Form +1. Go to [forms.google.com](https://forms.google.com) +2. Click "Blank" +3. Title: "LLM4ChipDesign Prerequisite Survey" + +### Step 2: Configure Settings (⚙️ icon) +- ✅ Collect email addresses +- ✅ Limit to 1 response +- ✅ Allow response editing +- ✅ Show progress bar + +### Step 3: Add Sections & Questions +Copy from `LLM4ChipDesign_Prerequisite_Survey.md`: + +**Section 1: Personal Info** (4 questions) +- Name, Email, Institution, Role + +**Section 2: Education** (2 questions) +- Education level, Field of study + +**Section 3: Hardware Design** (4 questions) +- HDL experience, Languages used, Digital design, EDA tools + +**Section 4: Verification** (3 questions) +- Verification experience, Methods, Testbench generation + +**Section 5: Programming** (3 questions) +- Programming experience, Languages, HLS experience + +**Section 6: AI/ML** (4 questions) +- ML experience, LLM experience, Frameworks, Code generation + +**Section 7: Specialized Knowledge** (4 questions) +- CNF, Prefix circuits, FSMs, SPICE + +**Section 8: Research & Security** (3 questions) +- Hardware security, IP piracy, Research methodology + +**Section 9: Goals** (3 questions) +- Learning goals, Topics of interest, Project applications + +**Section 10: Additional** (2 questions) +- Additional experience, Questions/concerns + +### Step 4: Test & Share +1. Click "Preview" to test +2. Click "Send" to get shareable link +3. Responses save automatically to Google Sheets + +## 📊 Question Types Quick Guide +- **Short Answer**: Name, Email, Institution +- **Multiple Choice**: Experience levels (No experience → Expert) +- **Checkboxes**: Multiple selections (tools, languages, topics) +- **Paragraph**: Open-ended (goals, projects, additional info) + +## 💡 Pro Tips +- Use "Add section" to organize questions +- Mark important questions as "Required" +- Use "Duplicate" for similar questions +- Preview frequently to check flow + +Total questions: 32 | Estimated time: 10-15 minutes \ No newline at end of file diff --git a/README.md b/README.md index 0533d73..1ff8f2e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Generative AI for Chip Design ## Table of Contents +- [📋 Prerequisite Survey](#prerequisite-survey) - [AutoChip to Generate Functional Verilog](#autochip-to-generate-functional-verilog) - [VeriThoughts: Enabling Automated Verilog Code Generation using Reasoning and Formal Verification](#verithoughts-enabling-automated-verilog-code-generation-using-reasoning-and-formal-verification) - [Rome was Not Built in a Single Step: Hierarchical Prompting for LLM-based Chip Design](#rome-was-not-built-in-a-single-step-hierarchical-prompting-for-llm-based-chip-design) @@ -17,6 +18,17 @@ --- +## 📋 Prerequisite Survey +**Key Idea:** +A comprehensive Google Forms survey to assess participants' background knowledge before attending LLM4ChipDesign courses or workshops. The survey covers hardware design experience, programming skills, ML/AI knowledge, and specific expertise areas to help instructors tailor content appropriately. + +- 📋 **Survey Questions:** [LLM4ChipDesign_Prerequisite_Survey.md](LLM4ChipDesign_Prerequisite_Survey.md) +- 🚀 **Quick Setup Guide:** [QUICK_START.md](QUICK_START.md) +- 📖 **Detailed Instructions:** [README_Survey.md](README_Survey.md) +- 🔧 **Automation Tools:** [create_google_form.py](create_google_form.py) + +--- + ## AutoChip to Generate Functional Verilog **Key Idea:** AutoChip generates functional Verilog modules from an initial design prompt and testbench using a selected large language model. Errors from compilation and simulation are fed back into the LLM for repair. diff --git a/README_Survey.md b/README_Survey.md new file mode 100644 index 0000000..7e7091c --- /dev/null +++ b/README_Survey.md @@ -0,0 +1,165 @@ +# LLM4ChipDesign Prerequisite Survey - Google Forms Setup + +This directory contains everything needed to create a comprehensive prerequisite survey for the LLM4ChipDesign course/workshop using Google Forms. + +## Files Overview + +### 📋 `LLM4ChipDesign_Prerequisite_Survey.md` +Complete survey with 32 questions covering: +- Personal information and educational background +- Hardware design experience (HDLs, EDA tools, digital circuits) +- Verification and testing knowledge +- Programming and software development +- Machine Learning and LLM experience +- Specific knowledge areas (CNF, FSMs, prefix circuits, etc.) +- Research background and security awareness +- Learning goals and expectations + +### 🔧 `google_forms_structure.json` +Structured JSON configuration containing: +- Form metadata (title, description, settings) +- Question definitions with types and options +- Section organization +- Implementation instructions + +### 🐍 `create_google_form.py` +Python script for automated form creation: +- Uses Google Forms API (requires authentication) +- Creates form from JSON configuration +- Includes manual fallback instructions +- Generates helpful templates + +## Quick Start (Manual Creation) + +### Option 1: Manual Creation (Recommended) +1. Go to [Google Forms](https://forms.google.com) +2. Click "Blank" to create new form +3. Copy questions from `LLM4ChipDesign_Prerequisite_Survey.md` +4. Follow the detailed instructions in the markdown file +5. Configure settings as specified + +### Option 2: Automated Creation (Advanced) +1. Install Python dependencies: + ```bash + pip install google-api-python-client google-auth google-auth-oauthlib google-auth-httplib2 + ``` +2. Set up Google Cloud Console: + - Create project + - Enable Google Forms API + - Create OAuth 2.0 credentials + - Download `credentials.json` +3. Run the script: + ```bash + python create_google_form.py + ``` + +## Survey Features + +### 📊 Question Types +- **Multiple Choice**: Experience levels, background areas +- **Checkboxes**: Multiple selections (tools, languages, frameworks) +- **Short Answer**: Basic information (name, institution) +- **Paragraph**: Open-ended responses (goals, projects) + +### 🎯 Coverage Areas +- **Hardware Design**: Verilog, SystemVerilog, VHDL, EDA tools +- **Verification**: SVA, UVM, formal verification, testbenches +- **Programming**: C/C++, Python, HLS, software development +- **AI/ML**: LLMs, frameworks, code generation experience +- **Specialized Topics**: All areas covered in the repository + +### ⚙️ Configuration +- Email collection enabled +- One response per person +- Response editing allowed +- Progress bar shown +- Logical question flow maintained + +## Data Collection + +### 📈 Response Analysis +Responses automatically save to Google Sheets with: +- Individual response tracking +- Automatic summary charts +- Export capabilities (CSV, Excel) +- Real-time response monitoring + +### 🔍 Expected Insights +- Participant experience distribution +- Knowledge gaps identification +- Course content customization data +- Prerequisites validation + +## Usage Scenarios + +### 🎓 Course Planning +- **Before Course**: Assess prerequisite knowledge +- **Content Adaptation**: Tailor material to audience level +- **Group Formation**: Balance teams by experience + +### 🔬 Research Applications +- **Baseline Assessment**: Measure starting knowledge +- **Demographics**: Understand participant background +- **Follow-up Studies**: Track learning progression + +## Customization + +### ✏️ Modifying Questions +1. Edit `LLM4ChipDesign_Prerequisite_Survey.md` +2. Update `google_forms_structure.json` if using automation +3. Test changes before deployment + +### 🎨 Branding +- Add institution logo to Google Form +- Customize colors and themes +- Include contact information + +## Best Practices + +### 📋 Before Deployment +- [ ] Review all questions for clarity +- [ ] Test form functionality +- [ ] Set up response notifications +- [ ] Prepare data analysis plan + +### 📊 During Collection +- [ ] Monitor response rates +- [ ] Address participant questions +- [ ] Check for technical issues +- [ ] Send reminders if needed + +### 📈 After Collection +- [ ] Export data for analysis +- [ ] Generate summary reports +- [ ] Share insights with instructors +- [ ] Archive responses securely + +## Support + +### 🐛 Troubleshooting +- **Form not working**: Check question requirements and logic +- **API issues**: Verify credentials and permissions +- **Data problems**: Check export format and encoding + +### 📞 Getting Help +- Google Forms Help Center +- Repository maintainers +- Course organizers + +## Privacy and Security + +### 🔒 Data Protection +- Only collect necessary information +- Secure response storage +- Clear data retention policies +- Participant consent obtained + +### 📝 Compliance +- Follow institutional IRB requirements +- Respect privacy regulations +- Maintain data confidentiality +- Provide opt-out mechanisms + +--- + +**Note**: This survey is designed to be comprehensive while remaining manageable for participants (estimated completion time: 10-15 minutes). Adjust questions based on your specific needs and audience. \ No newline at end of file diff --git a/create_google_form.py b/create_google_form.py new file mode 100644 index 0000000..68f3950 --- /dev/null +++ b/create_google_form.py @@ -0,0 +1,328 @@ +#!/usr/bin/env python3 +""" +Google Forms Creation Helper for LLM4ChipDesign Prerequisite Survey + +This script provides utilities to help create and manage the prerequisite survey +using Google Forms API. Note: This requires Google API credentials and the +Google Forms API to be enabled in your Google Cloud Console. + +Installation: +pip install google-api-python-client google-auth google-auth-oauthlib google-auth-httplib2 + +Setup: +1. Go to Google Cloud Console +2. Create a new project or select existing +3. Enable Google Forms API +4. Create credentials (OAuth 2.0 client ID) +5. Download credentials.json file +6. Place in same directory as this script +""" + +import json +import os +from typing import Dict, List, Any + +try: + from googleapiclient.discovery import build + from google.oauth2.credentials import Credentials + from google_auth_oauthlib.flow import InstalledAppFlow + from google.auth.transport.requests import Request + GOOGLE_API_AVAILABLE = True +except ImportError: + GOOGLE_API_AVAILABLE = False + print("Google API client not installed. Install with:") + print("pip install google-api-python-client google-auth google-auth-oauthlib google-auth-httplib2") + +# If modifying these scopes, delete the file token.json. +SCOPES = ['https://www.googleapis.com/auth/forms.body'] + +class GoogleFormsSurveyCreator: + """Helper class to create Google Forms survey from JSON configuration""" + + def __init__(self, credentials_file='credentials.json', token_file='token.json'): + self.credentials_file = credentials_file + self.token_file = token_file + self.service = None + + def authenticate(self): + """Authenticate with Google API""" + if not GOOGLE_API_AVAILABLE: + raise ImportError("Google API client libraries not available") + + creds = None + if os.path.exists(self.token_file): + creds = Credentials.from_authorized_user_file(self.token_file, SCOPES) + + if not creds or not creds.valid: + if creds and creds.expired and creds.refresh_token: + creds.refresh(Request()) + else: + if not os.path.exists(self.credentials_file): + raise FileNotFoundError(f"Credentials file {self.credentials_file} not found") + flow = InstalledAppFlow.from_client_secrets_file( + self.credentials_file, SCOPES) + creds = flow.run_local_server(port=0) + + with open(self.token_file, 'w') as token: + token.write(creds.to_json()) + + self.service = build('forms', 'v1', credentials=creds) + return True + + def create_form_from_json(self, json_file='google_forms_structure.json'): + """Create Google Form from JSON configuration""" + if not self.service: + self.authenticate() + + with open(json_file, 'r') as f: + config = json.load(f) + + form_config = config['form'] + + # Create the form + form = { + "info": { + "title": form_config['title'], + "description": form_config['description'] + } + } + + result = self.service.forms().create(body=form).execute() + form_id = result['formId'] + + print(f"Created form with ID: {form_id}") + print(f"Form URL: https://docs.google.com/forms/d/{form_id}/edit") + + # Add questions + self._add_questions_to_form(form_id, form_config['sections']) + + # Configure settings + self._configure_form_settings(form_id, form_config.get('settings', {})) + + return form_id + + def _add_questions_to_form(self, form_id: str, sections: List[Dict]): + """Add questions to the form""" + requests = [] + + for section in sections: + # Add section header if specified + if section.get('title'): + requests.append({ + "createItem": { + "item": { + "title": section['title'], + "description": section.get('description', ''), + "pageBreakItem": {} + }, + "location": {"index": len(requests)} + } + }) + + # Add questions in the section + for question in section['questions']: + question_item = self._create_question_item(question) + requests.append({ + "createItem": { + "item": question_item, + "location": {"index": len(requests)} + } + }) + + if requests: + batch_update = {"requests": requests} + self.service.forms().batchUpdate( + formId=form_id, body=batch_update).execute() + + def _create_question_item(self, question: Dict) -> Dict: + """Create a question item from configuration""" + item = { + "title": question['text'], + "description": question.get('description', ''), + } + + if question['required']: + item["required"] = True + + question_type = question['type'] + + if question_type == 'SHORT_ANSWER': + item["textItem"] = {"paragraph": False} + elif question_type == 'PARAGRAPH': + item["textItem"] = {"paragraph": True} + elif question_type == 'MULTIPLE_CHOICE': + item["choiceItem"] = { + "type": "RADIO", + "options": [{"value": opt} for opt in question['options']] + } + elif question_type == 'CHECKBOX': + item["choiceItem"] = { + "type": "CHECKBOX", + "options": [{"value": opt} for opt in question['options']] + } + elif question_type == 'DROPDOWN': + item["choiceItem"] = { + "type": "DROP_DOWN", + "options": [{"value": opt} for opt in question['options']] + } + elif question_type == 'LINEAR_SCALE': + item["scaleItem"] = { + "low": question.get('scale_low', 1), + "high": question.get('scale_high', 5), + "lowLabel": question.get('low_label', ''), + "highLabel": question.get('high_label', '') + } + + return item + + def _configure_form_settings(self, form_id: str, settings: Dict): + """Configure form settings""" + requests = [] + + if settings.get('collectEmail'): + requests.append({ + "updateSettings": { + "settings": {"quizSettings": {"isQuiz": False}}, + "updateMask": "quizSettings.isQuiz" + } + }) + + if requests: + batch_update = {"requests": requests} + self.service.forms().batchUpdate( + formId=form_id, body=batch_update).execute() + +def create_manual_instructions(): + """Generate step-by-step manual instructions for creating the form""" + instructions = """ + MANUAL GOOGLE FORMS CREATION INSTRUCTIONS + ========================================= + + Since the Google Forms API requires authentication setup, here are manual + instructions to create the survey: + + 1. GO TO GOOGLE FORMS + - Visit https://forms.google.com + - Click "Blank" to create a new form + + 2. SET UP FORM BASICS + - Title: "LLM4ChipDesign Prerequisite Survey" + - Description: "This survey assesses participants' background knowledge + for the LLM4ChipDesign course/workshop. Your responses will help us + tailor the content to match the audience's experience level." + + 3. CONFIGURE SETTINGS + - Click the settings gear icon + - General tab: + ✓ Collect email addresses + ✓ Limit to 1 response + ✓ Allow response editing + - Presentation tab: + ✓ Show progress bar + ✗ Shuffle question order + + 4. ADD QUESTIONS + Follow the detailed questions in 'LLM4ChipDesign_Prerequisite_Survey.md' + + For each question: + - Copy the question text + - Select the appropriate question type + - Add answer options for multiple choice/checkbox questions + - Set required/optional as specified + + 5. ORGANIZE WITH SECTIONS + - Add section breaks for each major category + - Sections: Personal Info, Education, Hardware Design, ML/AI, Goals + + 6. TEST THE FORM + - Use "Preview" to test the form + - Check that all questions work correctly + - Verify logic and flow + + 7. SHARE THE FORM + - Click "Send" + - Copy the link to share with participants + - Can also embed in websites or create QR codes + + 8. SET UP RESPONSE COLLECTION + - Responses automatically save to Google Sheets + - Access via "Responses" tab + - Download as CSV/Excel for analysis + """ + + with open('manual_creation_instructions.txt', 'w') as f: + f.write(instructions) + + print("Manual creation instructions saved to 'manual_creation_instructions.txt'") + +def generate_csv_template(): + """Generate a CSV template for expected responses""" + import csv + + headers = [ + 'Timestamp', 'Email', 'Name', 'Institution', 'Role', 'Education Level', + 'Field of Study', 'HDL Experience', 'HDL Languages', 'Digital Design Experience', + 'EDA Tools', 'Verification Experience', 'Verification Methods', 'Testbench Experience', + 'Programming Experience', 'Programming Languages', 'HLS Experience', 'ML Experience', + 'LLM Experience', 'AI Frameworks', 'Code Generation with LLMs', 'CNF Knowledge', + 'Prefix Circuits Knowledge', 'FSM Knowledge', 'SPICE Knowledge', 'Hardware Security', + 'IP Piracy Awareness', 'Research Experience', 'Learning Goals', 'Topics of Interest', + 'Project Applications', 'Additional Experience', 'Questions/Concerns' + ] + + with open('survey_response_template.csv', 'w', newline='') as f: + writer = csv.writer(f) + writer.writerow(headers) + # Add a sample row with placeholder data + sample_row = ['Sample'] * len(headers) + writer.writerow(sample_row) + + print("CSV template saved to 'survey_response_template.csv'") + +def main(): + """Main function to demonstrate usage""" + print("LLM4ChipDesign Survey Creation Helper") + print("=====================================") + + # Check if Google API is available + if not GOOGLE_API_AVAILABLE: + print("\nGoogle API not available. Generating manual instructions...") + create_manual_instructions() + generate_csv_template() + return + + # Check for credentials + if not os.path.exists('credentials.json'): + print("\nGoogle API credentials not found.") + print("To use automated form creation:") + print("1. Go to Google Cloud Console") + print("2. Enable Google Forms API") + print("3. Create OAuth 2.0 credentials") + print("4. Download as 'credentials.json'") + print("\nGenerating manual instructions instead...") + create_manual_instructions() + generate_csv_template() + return + + # Try to create form automatically + try: + creator = GoogleFormsSurveyCreator() + form_id = creator.create_form_from_json() + print(f"\nForm created successfully!") + print(f"Form ID: {form_id}") + print(f"Edit URL: https://docs.google.com/forms/d/{form_id}/edit") + print(f"Response URL: https://docs.google.com/forms/d/{form_id}/viewform") + + except Exception as e: + print(f"\nError creating form: {e}") + print("Generating manual instructions...") + create_manual_instructions() + + # Always generate helpful files + generate_csv_template() + print("\nAdditional files created:") + print("- manual_creation_instructions.txt") + print("- survey_response_template.csv") + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/google_forms_structure.json b/google_forms_structure.json new file mode 100644 index 0000000..b40234e --- /dev/null +++ b/google_forms_structure.json @@ -0,0 +1,259 @@ +{ + "form": { + "title": "LLM4ChipDesign Prerequisite Survey", + "description": "This survey assesses participants' background knowledge for the LLM4ChipDesign course/workshop. Your responses will help us tailor the content to match the audience's experience level.", + "settings": { + "collectEmail": true, + "limitOneResponsePerPerson": true, + "allowResponseEditing": true, + "showProgressBar": true, + "shuffleQuestions": false + }, + "sections": [ + { + "title": "Personal Information", + "questions": [ + { + "id": "name", + "text": "Name (Optional)", + "type": "SHORT_ANSWER", + "required": false + }, + { + "id": "email", + "text": "Email Address", + "type": "SHORT_ANSWER", + "required": true + }, + { + "id": "institution", + "text": "Institution/Organization", + "type": "SHORT_ANSWER", + "required": true + }, + { + "id": "role", + "text": "Current Role/Position", + "type": "MULTIPLE_CHOICE", + "required": true, + "options": [ + "Undergraduate Student", + "Graduate Student (Master's)", + "Graduate Student (PhD)", + "Research Scientist", + "Industry Engineer", + "Faculty/Professor", + "Other" + ] + } + ] + }, + { + "title": "Educational Background", + "questions": [ + { + "id": "education_level", + "text": "What is your highest level of education?", + "type": "MULTIPLE_CHOICE", + "required": true, + "options": [ + "High School", + "Bachelor's Degree", + "Master's Degree", + "PhD", + "Other" + ] + }, + { + "id": "field_of_study", + "text": "What is your primary field of study/expertise?", + "type": "MULTIPLE_CHOICE", + "required": true, + "options": [ + "Computer Science", + "Electrical Engineering", + "Computer Engineering", + "Mathematics/Statistics", + "Physics", + "Other Engineering", + "Other" + ] + } + ] + }, + { + "title": "Hardware Design Experience", + "questions": [ + { + "id": "hdl_experience", + "text": "Rate your experience with Hardware Description Languages (HDLs)", + "type": "MULTIPLE_CHOICE", + "required": true, + "options": [ + "No experience", + "Beginner (basic syntax knowledge)", + "Intermediate (can write simple modules)", + "Advanced (can design complex systems)", + "Expert (professional level)" + ] + }, + { + "id": "hdl_languages", + "text": "Which Hardware Description Languages have you used? (Select all that apply)", + "type": "CHECKBOX", + "required": true, + "options": [ + "Verilog", + "SystemVerilog", + "VHDL", + "Chisel", + "SpinalHDL", + "None", + "Other" + ] + }, + { + "id": "digital_design_experience", + "text": "Rate your experience with digital circuit design", + "type": "MULTIPLE_CHOICE", + "required": true, + "options": [ + "No experience", + "Beginner (basic logic gates)", + "Intermediate (combinational and sequential circuits)", + "Advanced (complex digital systems)", + "Expert (professional level)" + ] + }, + { + "id": "eda_tools", + "text": "Have you worked with Electronic Design Automation (EDA) tools?", + "type": "CHECKBOX", + "required": true, + "options": [ + "Xilinx Vivado", + "Intel Quartus", + "Cadence tools", + "Synopsys tools", + "ModelSim/QuestaSim", + "Open-source tools (Yosys, etc.)", + "None", + "Other" + ] + } + ] + }, + { + "title": "Machine Learning and AI Experience", + "questions": [ + { + "id": "ml_experience", + "text": "Rate your experience with Machine Learning", + "type": "MULTIPLE_CHOICE", + "required": true, + "options": [ + "No experience", + "Beginner (basic concepts)", + "Intermediate (implemented models)", + "Advanced (research/professional work)", + "Expert (ML researcher/engineer)" + ] + }, + { + "id": "llm_experience", + "text": "Rate your experience with Large Language Models (LLMs)", + "type": "MULTIPLE_CHOICE", + "required": true, + "options": [ + "No experience", + "Beginner (used ChatGPT/similar tools)", + "Intermediate (fine-tuning, prompt engineering)", + "Advanced (LLM research/development)", + "Expert (LLM specialist)" + ] + }, + { + "id": "ai_frameworks", + "text": "Which AI/ML frameworks have you used? (Select all that apply)", + "type": "CHECKBOX", + "required": true, + "options": [ + "TensorFlow", + "PyTorch", + "Hugging Face Transformers", + "OpenAI API", + "scikit-learn", + "JAX", + "None", + "Other" + ] + } + ] + }, + { + "title": "Goals and Expectations", + "questions": [ + { + "id": "learning_goals", + "text": "What do you hope to learn from the LLM4ChipDesign course/workshop?", + "type": "PARAGRAPH", + "required": true + }, + { + "id": "topics_of_interest", + "text": "Which specific topics are you most interested in? (Select all that apply)", + "type": "CHECKBOX", + "required": true, + "options": [ + "AutoChip (Verilog generation with feedback)", + "VeriThoughts (reasoning-based Verilog generation)", + "ROME (hierarchical prompting)", + "Veritas (CNF-guided synthesis)", + "PrefixLLM (prefix circuit design)", + "Testbench generation for FSMs", + "Natural language to SystemVerilog assertions", + "Hardware security and IP piracy", + "Software-to-hardware design (C2HLSC)", + "Analog circuit design (Masala-CHAI)", + "All topics" + ] + }, + { + "id": "project_applications", + "text": "Do you have any specific projects or applications in mind where you might apply these techniques?", + "type": "PARAGRAPH", + "required": false + } + ] + } + ] + }, + "instructions": { + "google_forms_setup": [ + "1. Go to https://forms.google.com", + "2. Click 'Blank' to create a new form", + "3. Set the title to 'LLM4ChipDesign Prerequisite Survey'", + "4. Add the description from this JSON", + "5. For each section, add a new section in Google Forms", + "6. Add questions according to the type specified", + "7. Configure settings: collect email, limit responses, etc.", + "8. Test the form before sharing", + "9. Share the form link with participants" + ], + "question_type_mapping": { + "SHORT_ANSWER": "Short answer text", + "PARAGRAPH": "Paragraph", + "MULTIPLE_CHOICE": "Multiple choice", + "CHECKBOX": "Checkboxes", + "LINEAR_SCALE": "Linear scale", + "DROPDOWN": "Dropdown" + }, + "data_analysis": [ + "Responses are automatically saved to Google Sheets", + "Use the 'Responses' tab to view individual responses", + "Use the 'Summary' tab for automatic charts and statistics", + "Export to CSV/Excel for advanced analysis", + "Consider using pivot tables for cross-tabulation analysis" + ] + } +} \ No newline at end of file diff --git a/manual_creation_instructions.txt b/manual_creation_instructions.txt new file mode 100644 index 0000000..846aac9 --- /dev/null +++ b/manual_creation_instructions.txt @@ -0,0 +1,55 @@ + + MANUAL GOOGLE FORMS CREATION INSTRUCTIONS + ========================================= + + Since the Google Forms API requires authentication setup, here are manual + instructions to create the survey: + + 1. GO TO GOOGLE FORMS + - Visit https://forms.google.com + - Click "Blank" to create a new form + + 2. SET UP FORM BASICS + - Title: "LLM4ChipDesign Prerequisite Survey" + - Description: "This survey assesses participants' background knowledge + for the LLM4ChipDesign course/workshop. Your responses will help us + tailor the content to match the audience's experience level." + + 3. CONFIGURE SETTINGS + - Click the settings gear icon + - General tab: + ✓ Collect email addresses + ✓ Limit to 1 response + ✓ Allow response editing + - Presentation tab: + ✓ Show progress bar + ✗ Shuffle question order + + 4. ADD QUESTIONS + Follow the detailed questions in 'LLM4ChipDesign_Prerequisite_Survey.md' + + For each question: + - Copy the question text + - Select the appropriate question type + - Add answer options for multiple choice/checkbox questions + - Set required/optional as specified + + 5. ORGANIZE WITH SECTIONS + - Add section breaks for each major category + - Sections: Personal Info, Education, Hardware Design, ML/AI, Goals + + 6. TEST THE FORM + - Use "Preview" to test the form + - Check that all questions work correctly + - Verify logic and flow + + 7. SHARE THE FORM + - Click "Send" + - Copy the link to share with participants + - Can also embed in websites or create QR codes + + 8. SET UP RESPONSE COLLECTION + - Responses automatically save to Google Sheets + - Access via "Responses" tab + - Download as CSV/Excel for analysis + \ No newline at end of file diff --git a/survey_response_template.csv b/survey_response_template.csv new file mode 100644 index 0000000..626a6eb --- /dev/null +++ b/survey_response_template.csv @@ -0,0 +1,2 @@ +Timestamp,Email,Name,Institution,Role,Education Level,Field of Study,HDL Experience,HDL Languages,Digital Design Experience,EDA Tools,Verification Experience,Verification Methods,Testbench Experience,Programming Experience,Programming Languages,HLS Experience,ML Experience,LLM Experience,AI Frameworks,Code Generation with LLMs,CNF Knowledge,Prefix Circuits Knowledge,FSM Knowledge,SPICE Knowledge,Hardware Security,IP Piracy Awareness,Research Experience,Learning Goals,Topics of Interest,Project Applications,Additional Experience,Questions/Concerns +Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample