Showing posts with label osx. Show all posts
Showing posts with label osx. Show all posts

Wednesday, February 2, 2011

SystemC on Mac

SystemC works on Mac!

Thanks to the folks at Logic Poet, SystemC on Mac is much easier than on Windows and Linux. Get then installer here and install it. You know how to install an app in Mac, don't you? don't you?

The important files are installed in /Library/SystemC/Current.
For your compulsory Hello World in SystemC, first create a New Project by keying Shift-Apple-N. When you get this dialog, choose SystemC app:

You can also see there's other types of SystemC projects available including TLM and AMS. Anyway, you'll get a dummy program FOC. Let's name the project "sc_hello". You will then get this:

Build it by hitting Apple-B. Run it by clicking on Product->sc_hello on the control pane on the left:

Congratulations! Now you can forget about SystemC on Linux, or gasp, on Visual Studio!...

Wednesday, October 20, 2010

Clean Up MP3 Filenames

import os

base = '/home/maczulu/Music'
os.chdir(base)
filelist = os.listdir(base)
for file in filelist:
  if '_' in file:
    newname = file.replace('_',' ')
    print file,newname
    os.rename(file, newname)