Thursday, 2 October 2014

Modding a Lattice CPLD ispMACH 4256ZE breakout board for an external clock

4256ZE Breakout Board with CLK PCB Operating
Taking a quote from the Lattice website this board is probably the best way of getting started with a CPLD I know of with 5V tolerant I/Os:

"The ispMACH 4256ZE Breakout Board is a simple, low-cost board that provides convenient access to densely-spaced IOs. Each I/O on the device is connected to 100-mil header holes. By adding test probes, jumper wires, or pin headers to the board, you can easily evaluate function and performace of the IO cells of the ispMACH 4256ZE."

The only issue I have with this board is that unlike its more modern version, the MachXO2 Breakout Board (note that its IOs are only 3.3V tolerant), it has no site for an external clock crystal on the PCB. This means you are limited to the internal 5MHz oscillator. Or not if you are clever and have access to PCB design software and are willing to spend $1 with OSH Park community PCB service.
The Oscillator series chosen for this project was the Fox FXO-HC53 series, a SMT crystal measuring 5mm by 3.2mm. Since this chip doesn't support LVDS we are using a HCMOS output. The two speeds chosen were 80MHz and 200MHz.
Note the oscillator is specified to drive up to 15pF and a CLK input pin on the ispMACH 4256ZE is 6pF max. The traces on the board are going to contribute further capacitance but it should be within spec.

The board design is detailed below:
CLK Board Schematic

The PCB design has a few features that are worth noting:
  • The output pin of the oscillator is placed as close as possible to the output pin hole and the ground pin hole is as close as possible to the ground pin of the oscillator. This is to minimize impedance and coupling of the high frequency on the board.
  • There are two ground pins - one for the power supply and the other for the CLK return current to make it easier to interface.
  • A pullup resistor 0805 position is available in case the internal pullup proves insufficient or a different crystal is chosen.
  • The footprint of the crystal has the pad size extended outside the normal footprint by twice the length to allow manual soldering.
  • The power and output pins are in a row on a 0.1" spacing to allow compatibility with standard prototyping boards and systems.
  • The bottom of the board under the crystal and high frequency traces is one large ground plane.
  • Total board size is 525mil x 375mil.
CLK Board Top Layer


CLK Board Bottom Layer (Text not reversed)




OSH Park Rendering of the Manufactured PCB




Wednesday, 17 September 2014

Installing LaTeXML into a local directory...

I have been working for a while on a document management system that will use MathJax and .tex inputs to create pretty PDF output and good websites.

Researching the available converters the one that is most attractive and most maintained is LaTeXML.

Firstly I have to setup perl to install packages locally for me to use:

PATH="$PATH:~/perl5/bin"
export PERL5LIB=~/perl5/lib/perl5
export PERL_MB_OPT="--install_base '$HOME/perl5'"
export PERL_MM_OPT="INSTALL_BASE=$HOME/perl5"
curl -L http://cpanmin.us | perl - -l ~/perl5 App::cpanminus local::lib 

I now have to fetch and install LaTeXML:

cpanm http://search.cpan.org/CPAN/authors/id/B/BR/BRMILLER/LaTeXML-0.8.0.tar.gz --force
 
Note that you will need the prerequisite system libraries installed onto the system - this approach doesn't provide copies of LibXML etc. as needed.

Command lines:
latexml --dest=example.xml example.tex
latexmlpost --format=html5 --javascript='../MathJax_down/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --destination=example.html example.xml
 
The results are really quite impressive - no links yet as they are behind our 'paywall' but hopefully soon.

A Blast From the Past: Valve/Tube/Electro-optic LA2A

Drip Electronics OPTO 6 version of the 1968 LA2A
When a friend of mine came and asked if I would help him build out an audio compressor that is based on tube amplification and some custom electro-optical cells I, of course, agreed!

The full details of the device are online at Drip Electronics: OPTO 6 (LA2A). They build a PCB to approximate the old point to point wiring typically found under tube systems as well as build the custom electro-optical cells.

Now I am not a tube guy nor an audio guy but any electronics that glows when it is working is good electronics.

Yours truly, (Matthew Swabey) testing the system with safety
 glasses in case one of the tubes or big caps "pops"
I really enjoyed the different construction style but testing was a real problem - the system is so non-linear, clips all the time and distorts it is almost impossible to know if I built it right. The current owner had to take it home and test with a microphone and speakers before it could be signed off.



Tuesday, 15 July 2014

Making ModelSim vsim and Questa vco work on Ubuntu 14.04

In my previous article, http://mattaw.blogspot.com/2014/05/making-modelsim-altera-starter-edition.html, I covered how to install and run the ModelSim-ALTERA starter edition on Ubuntu 14.04.

Subsequently it turns out this fix also applies to Mentor Graphic's ModelSim and Mentor Graphic's Questa (not that surprising as Questa is a superset of ModelSim with far greater capabilities).

The previous instructions for ModelSim ALTERA work for ModelSim.

Here are the detailed instructions to apply the fix to Questa:

Firstly complete installing everything including compiling the new libfreetype libraries and copying them into the questasim directory.

Now we need to edit the vco launch script to ensure the new freetype libraries are used:
sudo vim bin/vco
Search for the following line:
dir=`dirname $arg0`
and underneath add the following new line:
export LD_LIBRARY_PATH=${dir}/lib32
 
Test by running vco and hopefully you will be greeted by the Questa GUI.

Please email me any fixes or changes you would like so I can update this post and give credit.

Monday, 30 June 2014

Dr. Matthew A. Swabey - Curriculum Vitae

Quicklinks: Professional Career | Education | Current Teaching and Administration | Awards & Proposals | Industrial Activities | Papers & Articles | Skills & Experience | Professional Affiliations | Board Memberships | Previous Teaching & Administration

Professional Career

February 2011 – Present: Deputy Director of Instructional Labs, ECE, Purdue University. Updating and maintaining analogue and mixed signal laboratory curriculum for eight classes in ECE including EE Senior Design, a total of ~1200 students per semester. Lending expertise to research programs as needed. Managing a diverse team of two full time staff, temporary staff, ~20 teaching assistants and ~40 undergraduate lab assistants. Controlling budget spend of approximately $500k per year on equipment and staff. Maintaining and updating expertise in electronic laboratory instrumentation to support curriculum. Partnering with Dr. M. Johnson to run  undergraduate ASIC mixed signal SoC design teams that fabricate and test custom integrated circuits as projects.
February 2009 - February 2011: Researcher with the ARM-ECS Industry-University Center establishing relationships with ARM engineers, licensing silicon IP, EDA tools and installing new flows. Personally taped out a simple ARM Cortex M0 SoC and assisted with the validation and DRC of the Tokachi-1&2 and Tokachi-3M TSMC 65nm research SoCs. Validated and tested the pre-release version of the ARM® Cortex®-M0 DesignStart™ Processor.
August 2007 – February 2011: Teaching Fellow, ECS, Southampton University. Employed at the same grade as a lecturer/instructor with a remit to innovate in teaching. Developed and delivered teaching in computer architecture, analogue electronics, electronic laboratories, C programming laboratories, DSP laboratories and managed all the MSc projects and dissertations. Developed microelectronic EDA flows and the cluster computing facilities to run them.
July 2006 – July 2007: Research Fellow, ECS, Southampton University. Researcher (Engineering and Physical Sciences Research Council (EPSRC) grant EP/E015522/1) extending the previous PhD studies into creating an OAE based biometric. Principle work areas were: systematic data collection, signal processing, the design and construction of novel very low noise analogue interface circuits and DSP software.
April 2005 – June 2006: Research Fellow, ECS, Southampton University. Researcher (EPSRC grant GR/S45324/01) responsible for specifying, designing and building the infrastructure for studying renewable energy management in suboptimal sites. The embedded system developed consisted of a Gumstix (an Intel XScale based single board computer running Linux) controlling a network of bespoke intelligent active energy monitors via an I2C bus.

Education

School of Electronics and Computer Science (ECS), University of Southampton, UK:

2007 – 2008: Postgraduate Certificate of Academic Practice This is a Master’s level qualification (PG Cert) in teaching at University level. It focuses on the development of discipline-specific teaching and learning approaches alongside core competencies.
2001 – 2006: PhD titled “The Human Auditory System as a Biometric” This original research built on existing medical knowledge of otoacoustic emissions (OAEs). It required synthesizing a national medical dataset from separate studies and mathematically analysing it. Various parameterised identification algorithms were developed and an equal error rate of 1 in 1229 (0.0814%) was achieved. This was then verified against a smaller experimental dataset. A novel acquisition system was prototyped that improved on the existing medical systems by eliminating the requirement for a probe to be inserted into the ear canal. It used collector current tuned, discrete transistor ultra-low noise analogue designs.
1998 – 2001: Upper Second Class Bachelor of Engineering (Honours) in Electronic Engineering with a First Class for my final year project
Final Year Project: “Mobile Multichannel Telemetry System”. The project consisted of specifying the data capturing requirements and subsequently developing and designing the hardware and software for a multichannel, multi-rate data logger. A modular C system that compiled to a time-sliced program running on my custom board using a Microchip PIC17 with a 433MHz radio link to a PC was created.

Plymouth College, Ford Park, Plymouth, UK:

1992 – 1996:
A – Levels: Physics, Mathematics, Biology, General Studies
A/S – Level: Electronics
GCSEs: English Language & Literature, Mathematics, Physics, Biology, Chemistry, Electronics, Craft Design Technology, French, Latin

Current Teaching and Administration

Deputy Directory of Instructional Labs in ECE This is my present role and is covered above.
DL2 Laboratory Remodel One of the principle individuals involved in the $2.5 million dollar redesign of our current laboratory facilities to support approximately 50% of the ECE classes.
ECE 20700 Electronic Measurement Techniques This lab based course introduces and trains hundreds of students per semester in the use of essential electronic laboratory equipment. The learning context is realistic measurement situations and electronic constants.
ECE 20800 Electronic Devices and Design Laboratory This lab based course introduces the basic semiconductor devices from the p-n junction to the MOS transistor and finally the operation amplifier. Students have to design suitable bias circuits, verify and optimize them using SPICE.
ECE 30600 Electronic Circuits and Systems Laboratory Experiments in electronic circuits and systems including spectral analysis techniques, sampling, distortion measurements, random signals, signal-to-noise ratio and correlation.
ECE 30800 Systems Simulation and Control Laboratory Instruction and laboratory exercises in the solution of differential equations that arise in the modelling of physical systems. Instruction in the principles of operation and design of linear control systems.
ECE 40200 EE Design Projects This capstone course provides the essential ABET mandated senior design experience. Each semester requires the design of a technically challenging open-ended electrical-engineering project that will run each semester and then administrate and examine all the students.
ECE 44000 Transmission of Information Analysis and design of Analog and Digital Communication Systems. Emphasis on engineering applications of theory to communication system design. The laboratory introduces the use of advanced engineering workstations in the design and testing of communication systems.
ECE 49595 ASIC Fabrication and Test I & II The first semester of a two-semester sequence to give teams of 3 to 6 students the experience of designing an ASIC, having the chip fabricated, and testing it. The team of students will develop requirements for a design, prepare the design using VHDL, Verilog, create and use test benches to functionally verify the design, use automated tools to prepare a circuit layout, verify the final layout, submit the layout for fabrication, prepare a physical test bed, test or demonstrate the chip, and document all aspects of the design and test results

Awards & Proposals

Integrated Coherent Comb and Line-by-Line Pulse Shaper for RF Photonic Filtering (DARPA W3194Q-13-1-0018): Miniaturizing the existing Purdue development of 60GHz AWG technology developed by Prof. Andrew M. Weiner, Daniel E. Leaird and others.
JISC Research Data Programme (call 07/09): Proposal submitted July 2009 for £200,000 to fund investigations into the preservation and visualisation of stored research data inside virtual machines.
JISC Information Environment and e-Research (call 12/08): Proposal submitted February 2009 for £310,000 to fund the creation of a virtual machine enhanced e-repository to contain machine images alongside existing document types.
Synopsys’ Charles Babbage Grant 2009: This was awarded to the School of ECS based on the proposal co-written by myself and Professor David Flynn, ECS & ARM.

Vice-Chancellor’s Teaching Award 2008: “ELEC2017/8 D2 Design Exercise: Engineering Chip Design (ASIC)”, this award is for ECS’s flagship ASIC design exercise taken by all year 2 electronics students in teams of 6. It is split into two parts: design and simulation, then after silicon fabrication (4 months), testing and evaluation.
Best Paper Prize ICBA 2004: “Using Otoacoustic Emissions as a Biometric”. This was the first paper published in this area on my research into using OAEs as a biometric characteristic

Industrial Activities

Texas Instruments: Successfully petitioned them to license their LBC7 BiCMOS process and related IP to allow Purdue undergraduates to experience a genuine CMOS design experience. I continue to work closely with their University team.
ARM: Worked on validating and testing a pre-release version of the ARM Cortex M0 DesignStart IP for University Access.
Spirax Sarco: Mentoring in a Knowledge Transfer Partnership on a research programme based around Texas Instruments' C5000 DSP hardware.
Roke Manor: Consulted about the feasibility of a multiprocessor system on chip core technology being considered for deployment in a new ASIC.
IBM and Synopsys: A series of articles describing how to modernize and adapt the IBM PowerPC™ 405-FS simulation harness and build scripts to the modern versions of Design Compiler and DFT Compiler.
D4 Technology: C# based PC interface software and C based ZigBee Microcontroller firmware (Texas Instruments CC2430) for the basestation of a multichannel 1400 node network.
ECS: A packet radio beacon based on a Microchip PIC16 transmitting a base station packet at regular intervals on 433MHz for calibration and system testing.

 Papers & Articles

“Evaluation of otoacoustic emissions as a biometric”, Grabham N.J., Swabey M.A., Chambers P., Lutman M.E., White N.M., Chad J.E. and Beeby S.P., IEEE Transactions on Information Forensics and Security, 2012, 8, (1).
“A comparison of verification in the temporal andcepstrum-transformed domains of transient evoked otoacousticemissions for biometric identification”, Chambers P., Grabham, N.J., Swabey M.A., Lutman M.E., White N.M., Chad J.E., and Beeby S. P., International Journal of Biometrics, 2011, 3.  
"IBM PowerPC™ 405-S: Getting started", a series of articles taking the CPU from RTL through synthesis to gate level verification, Swabey M., http://mattaw.blogspot.com/2009/11/getting-started-with-synthesizable-ibm.html, November 2009 – January 2010.
"The biometric potential of transient otoacoustic emissions", Swabey, M., Chambers P., Lutman M., White N., Chad J., Brown A. and Beeby S., International Journal of Biometrics, 2009, Vol. 1, No. 3.
"Innovative Teaching of IC Design and Manufacture Using the Superchip Platform", Wilson P., Wilcock R., Swabey M. and McNally B.I., IEEE Transactions on Education, Accepted for publication, February 2009.
"The Superchip: Innovative Teaching of IC Design and Manufacture", Wilson, P., Wilcock, R., McNally, B.I., Swabey, M. and Al-Hashimi, B., Custom Integrated Circuits Conference, September 2008, San Jose, CA, USA.
"IC Design and Manufacture for Undergraduates: Theory, Design and Practice", Wilson, P., McNally, B.I., Swabey, M. and Al-Hashimi, B., 7th European Workshop on Microelectronics Education, 28th May 2008, Budapest, Hungary.
"An Intelligent Fuse-box for use with Renewable Energy Sources integrated within a Domestic Environment", Wilson, P., Swabey, M., Brown, A. and Ross, J., World renewable Energy Congress, May 2005, Aberdeen, UK.
"Investigation into the Uniqueness of Neonate Transient Otoacoustic Emissions", Swabey, M., Beeby, S., Brown, A. and Chad, J., Acoustic Research Letters Online, October 2004, Vol. 5, No. 4.
"Using Otoacoustic Emissions as a Biometric", Swabey, M., Beeby, S., Brown, A. and Chad, J., Lecture Notes on Computer Science, July 2004, Vol. 3072.

Skills and Experience

Teaching:

Seven years of tutoring, lecturing, supervising projects and setting exams within Purdue (USA) and Southampton (UK) including invited participation in the software education working party and the analogue electronics working party. The working parties are tasked with improving student engagement and understanding in their respective areas.
Four years of postgraduate demonstrating within ECS including input into the structure and content of undergraduate electronic laboratories.
Provided reviews, guidance, advice and practical help to numerous third and fourth year undergraduate and MSc projects from 2001.

Management and procurement:

One of the drivers of the planning and design of space and facilities for approximately seven laboratory classes with a budget of $2.5 million USD.
Budgeting, staffing, fitting out with suitable lab equipment, software and consumables for eight Purdue Undergraduate Electronics Labs. 
Deploying the Advanced Electronics Lab in ECS Southampton in 2008 to support cross departmental measurement and diagnostic work beyond the capabilities of individual research groups. This follows overseeing the commissioning of laboratories destroyed in the fire at Southampton in 2005.
Ongoing provision, licensing, installation and maintenance of part of the ECS CAD tool portfolio and IP portfolio (IBM, ARM, Cadence, Synopsys, Mentor Graphics, etc.).
Procurement and commissioning of a VMWare cluster, Linux servers and Sun CAD servers for research and teaching.
Production and maintenance of online (HTML/wiki) and print documentation.

Commercial and Industrial:

Established a strong relationship with Texas Instruments who are providing IP and microchip manufacturing for Purdue undergraduates for teaching purposes.
Established a strong working relationship with ARM and arm engineers enabling access to microelectronic IP suitable to pursue unique teaching opportunities.
Maintain Purdue’s relationship with Synopsys enabling access to pre-release tools, established through the Babbage grant, by creating material for their university curriculum and interacting with their engineers to integrate technologies into our courses where appropriate.
Maintained and extended the relationship with Imagination Technologies in Southampton involving them further in our undergraduate programme as a course sponsor and now a project sponsor. They are deploying their custom technology in our laboratories to enhance our MSc course in mobile electronics. ECS and Imagination are currently exploring joint research possibilities.

Electronics:

Constructing EDA flows around IBM 8RF, TSMC 65nm using Chip-under-pad and Texas Instruments LBC7 BiCMOS.
Building prototype ARM based SoCs (a simple ARM Cortex M0 based prototype) and the Tokachi-1&2 multicore research SoCs.
Experience with complete mixed signal design flow from specification to testing.
Successful mixed signal circuit designs built using radio modules.
Practical experience of hardware and software design for debugging. 
Familiarity with Texas Instruments Code Composer and TMS320 DSP architecture.
Mixed signal design experience using Microchip PIC and Atmel AVR microcontrollers.
VHDL, Verilog and System Verilog digital designs using Synopsys’ Design Compiler, Cadence Encounter, Synplicity Synplify (now Synopsys FPGA), Altera Quartus, Xilinx ISE and Mentor Graphic’s Modelsim.
PCB design and construction including 0805 surface mount using Cadence Orcad tools.
Extremely low noise audio frequency analogue circuit design using PSpice A/D.
Analogue CMOS CAD software Cadence DFII (IC5 and IC6).

Software:

Microsoft Office to deliver teaching and presentations (PowerPoint), papers (Word) and financial activities (Excel).
Latex for larger documents such as theses and book drafts.
Extensive C++ experience including the standard template library.
Extensive C and assembler for paged/non-paged memory microcontrollers.
Matlab/Simulink and Octave mathematical languages.
Working knowledge of scripting languages: Python, bash and (t)csh.
Experienced with the installation and management of Linux and Solaris CAD servers.
Proficient with Microsoft Windows 2000, XP and 7.
Previously maintained a Linux distribution for Sharp Zaurus PDAs (e.g. C760).

Professional Affiliations

Researcher at the ARM-ECS industry-university center, Southampton, UK
Member of the IEEE
Member of the Institution of Engineering and Technology
Fellow of the Higher Education Academy, UK

Board Memberships

Forum for Specification and Design Languages 2010, Local Technical Chair
Design, Automation & Test in Europe 2009, Chair of Local Organization Team (Technical Programme Meeting 2008)
11th IEEE European Test Symposium 2006, Local Technical Chair


Previous Teaching & Administration

MSc Microelectronics Systems Design Programme Leader While I held this role I was responsible for the academic content, admission requirements and day-to-day running of one of the two largest MSc programmes within ECS.
Co-supervisor of a PhD Project in an industrial collaboration with Spirax-Sarco developing novel DSP algorithms and the sensor/DSP platform to support them.
Supervisor of 4 MSc Projects in the area of computer architecture, developing RFID enhancements to commercial systems and robust, general purpose, SoC IP modules.
ELEC6003 & COMP6029 MSc Project Course Leader Aim: To maintain and improve the MSc support framework, handle mitigating circumstances cases and manage the running of all MSc programme projects.
COMP6009 Individual Research Project & COMP6033 Independent Research Review Course Leader Aim: To instil in students the essentials of credible academic research, i.e. evaluation of previous work, synthesis of work across a field and finally credible presentation of novel material. Also I ensured the annual student conference was an opportunity for them to practise essential research presentation skills in a realistic setting to our industrial partners.
ELEC3031 Analogue Electronics Course Leader Aim: To cover in some depth the mathematics and circuitry likely to be used between an analogue signal source and a digital signal processing system, making maximum use of available integrated circuits.
ELEC2013 Computer Systems Engineering Aim: To give understanding and context of modern processor architecture.
ELEC2018 Software Development Aim: To develop the needed skills to become a competent programmer for larger software projects.
COMP1010 ‘C’ Programming Laboratories Aim: To provide the student with the necessary skills to write C programs for PCs and microcontrollers.
ELEC1013 Introduction to Digital Electronics Laboratories Aim: To provide a background in digital electronics to computer science students

Friday, 20 June 2014

Unlocking the temperature on a Weller WSL or WSD 81 Solder Station

[Credit for the fix goes to Todd Wild]

Just had a weird problem with my Weller WSL with WMP pencil:

Symptom of initial failure:
The base unit was resetting and making a clicking noise while the iron temperature dropped.

When I looked closer the clicking noise was a screw I had put on the top of the base unit - every time it reset the screw jumped!

After opening the WMP pencil I discovered the strain relief failed and the wires inside the iron were shorting. After fixing that it worked perfectly but the base unit had become locked to 375°C! [Speculation is that the EEPROM in the micro was corrupted by all the hard resets and/or the EM pulses].

Symptom of locked base unit:
Trying to change the temperature failed with the display just flashing when up or down is pushed. Just in case you didn't know nearly all solder stations for production environments can be locked to prevent inexperienced people altering the soldering parameters.

Solution:
Purchase a WCB1 calibrator for $1500 (only joking! read on...)

-or-
Opened WSL / WSD81 base unit - the reset jumper is to the right of the "up button" at the top right

  1. Open the case (spudgers needed, start with prying open the keyholes sideways on either side of the heatsink on the back and then pry the case up from the slots along both sides starting at the back. It should pop off towards the front).
  2. Install a jumper on the empty 0.1" pitch pins to the right of the "Up" button on the top right of the PCB. In the picture they are just visible to the right of the black square which is the up button.
  3. Power on the base unit - watch out for the live 120/240V!
  4. Wait for the display to show FSE.
  5. Remove the jumper while it is powered on.
  6. ...
  7. Profit!
Hope this may be of some use to someone else.

Making my Lenovo MCE RC-6 IR Receiver immune to interference by my TV backlight - Success

Please see this article for the starting point of this work.

Installing the new Vishay module has completely solved my problem with the TV backlight. It was terribly simple as the part is 100% compatible with the original design.

Excellent!