s vik

image
Firmware/Software Engineer

Biography has not been added

svik

's contributions
Articles
Comments
Discussions
    • My Favourite Rules: Use Modules. Hide you mess inside. Define the architecture hierarchy in terms of the same modules. Define a linear order from drivers to main to match your .H files. Oh and do define an interface to each module (i.e. .H or tpu file). This is obvious but usually never done fully! NO files like global.h, functions.h or syswide.h allowed. Prove that your logic or function calls is not recursive. All fcn calls should be downstream. Document each exception where an upstream fcn call is used. KIS or KISS if you don't underestand KIS. Do code reviews. If another programmer can't understand it quickly, fail it. Do a simulator at the driver level and test your code on the desk top. A partial simulation is fine as it usually still allows you to test 90% of the code. Compile you embedded code for Win32 using free GNU or VisualC. Fix all those warnings. Build in testability, log files and stats trackers. I owe, I owe, so off to work I go!

    • If you want true engineered code to EE standards then use the limited C that can be compiled to FPGAs. This is available now! So no OS, no recursion, no allocation of memory, etc. Just KIS I/O rules all running in parallel with some state machines. If you are not sure what KIS means try KISS. svik

    • Bad programmers will make bad code no matter what process is used. Good programmers make good code even if there is no process. The split between good and bad programmers is about 20%/80% or maybe 10%/90% so make you hire the good 10%.

    • I did one little Z80 project. Have used the 64180 once. But Zilog is not even on the MAP. I have not heard of a development kit or an add for a nice integrated CPU with a cheap development kit??? Right now I am using C166 and Microchip ICs. Recent CPUs were Coldfire, powerPC, ARM, 80251, etc Where is Z80??? The Z80 may have an nice 'orthogonal' instruction set, sure!, but what do I care I program in C. What matters more is the quality of the C compiler. And how can they not make money??? Desiging the IC is not that difficult. Outsource the production and market the chips. I suspect they live in expensive $$$ area of California with expensive tastes. I just looked at the ZILOG web site to see if I could pick a nice IC with flash and loader and C to go. All I got was flashy pictures. Where is the CPU selection .............

    • Moodularity is the most important rule. I agree with you Jack. It is key to get the job done correctly and thus sooner. It also help to make sure all the error cases are covered so there are no suprises later. However In all the projects I have cleaned up there are always file called something like functions.H, global.h or syswide.h which are always filled every define in the system. Even though there are modules of .C file the system is not modular. The first thing I have to do is split all the .H files and move the defs to their corresponding .H modules matching the .C files. And then to review each module to make sure they consistent, hide local vars, have startup code, etc.