Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

PERL for tool and testing automation

by tahirsengine (Initiate)
on Jul 29, 2020 at 13:08 UTC ( [id://11119963]=perlquestion: print w/replies, xml ) Need Help??

tahirsengine has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am an engineer working in VLSI industry. I want to switch my job, but the job requirements also enlist the PERL scripting capability for verification. So is there any good tutorial that shows how that automation works? Like If I wrote a module and test bench in Modelsim, and I want to automate the testing, how will I go about that using PERL script? I have learned PERL, but I have no idea how to just about this specific problem. Thanks in advance

Replies are listed 'Best First'.
Re: Perl for tool and testing automation
by hippo (Bishop) on Jul 29, 2020 at 14:04 UTC

    I've never used Modelsim so cannot comment on that side. However, you can use Perl to test just about anything. Recently I wrote a Basic Testing Tutorial which will hopefully give you a very gentle introduction to testing with Perl. There are links at the end of the tutorial to other resources on the topic too.


    🦛

Re: Perl for tool and testing automation
by toolic (Bishop) on Jul 30, 2020 at 23:35 UTC

    No, generally speaking, there is no Perl tutorial related to running ModelSim simulations (or running any other simulators for that matter).

    I have been using Perl for over 20 years in the VLSI industry, using Verilog for ASIC design and verification. I don't have much experience with ModelSim, but with the other big boys (Cadence and Synopsys). Here is my experience, FWIW.

    When employers list Perl in a job description, it usually means they have a Perl code base which you may need to become familiar with and they expect you to have general experience with the following:

    • creating directory structures
    • moving files around
    • parsing files
    • launching applications (such as a simulation tool)
    • creating reports summarizing the simulation results

    They typically don't expect you to be an expert in Perl, but they are looking for experience with some language which allows you to automate these tasks: shell script, Perl, C++, Python, etc. Unless it is purely a software position, they are more focused on your digital logic design and verification abilities than on your Perl skillz. Be honest with an interviewer regarding your Perl experience level.

    Commonly in VLSI, Perl is used to parse and/or generate files with standard formats such as XML, HTML, CSV, Excel and Verilog. You would leverage CPAN for all of those. Additionally, you would parse simulation log files searching for such things as error messages, simulation times and random seed values using Perl regular expressions.

Re: PERL for tool and testing automation
by perlfan (Vicar) on Jul 29, 2020 at 14:46 UTC
    Before you automate, you need to be able to understand what you need at the most basic levels (manually). Interfacing with the external program and libraries can be done a variety of ways. I have seen Perl almost literally do anything, e.g., running a test harness on real flying drones during YAPC talks having the tests result in physical maneuvers. I am sure there is a video some where.

    There are some results on CPAN, but I suspect not what you're wanting.

    You must also provide some context about what Modelsim and and how it's normally used. There are very smart people here and they can figure it out, but you don't want them wasting time researching information you can provide.

    Perl can handle it all, but unless you share how you expect to interface with Modelsim, then the amount of help you'll receive will be limited. Is Modelsim a black box that can be interacted with as an external program (via API, as an external process, output files)? Is it a collection of compiled libraries that can be interfaced using a Foreign Function Interface?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11119963]
Approved by Corion
Front-paged by toolic
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-03-29 07:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found