LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 10-15-2010, 06:43 PM   #1
archShade
Member
 
Registered: Mar 2006
Location: Manchester England
Distribution: Debian, Slackware, Xandros (ASUS EEE);
Posts: 163

Rep: Reputation: 22
Is GPL applicable to HDL (hardware definition languages)


I have recently graduated from uni and during my time there I have developed an interest in HDL, specifically Verilog.

As my current job doesn't lend itself to doing anything in verilog so I decided to keep myself sharp by designing a 32 bit processor that is similar to (but not the same as) the MIPS processor it will certainly be RISC.

While starting work on it I have decided to start a blog detailing what I have done including the source file as I am entering my work into the wide world I think it needs a licence but I am not looking to make any money or even to derive any fame from what I'm doing. Like I said the main reason to do it is to keep me active in using HDLs.

I hope to gain from the blog suggestions for alternative(better) ways to do what I am doing, for people to use what I have done as an example of a medium sized project in verilog and to force me to have some form of documentation on my project.

That's enough self publication to the question.

Is the GPL (either version 2 or 3) applicable to work in HDL as it is not a traditional programming language but shares many of the same features? It certainly does not feel like I should use a CC licence.


I'm not sure this is the correct forum for this question but it seems most applicable.

Thanking you in advanced for your insight.
 
Old 10-15-2010, 06:59 PM   #2
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,123

Rep: Reputation: 407Reputation: 407Reputation: 407Reputation: 407Reputation: 407
Quote:
Originally Posted by archShade View Post
... HDL ... is not a traditional programming language ...
Why ? I've been working with Verilog for about 20 years now.
 
Old 10-16-2010, 03:45 AM   #3
archShade
Member
 
Registered: Mar 2006
Location: Manchester England
Distribution: Debian, Slackware, Xandros (ASUS EEE);
Posts: 163

Original Poster
Rep: Reputation: 22
Programming languages describe what data to send to various parts of the computer and what to do with the resultant data where as HDL defines the structure of hardware.

They share constructs and act in a similar way but do actually do a different job. Although under synthesis HDLs essential do what programming languages do when applied to an FPGA they work differently.

Because they are so similar I would have thought GPL would cover HDLs but not sure (thus asking).
 
Old 10-16-2010, 03:59 AM   #4
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,123

Rep: Reputation: 407Reputation: 407Reputation: 407Reputation: 407Reputation: 407
Quote:
Originally Posted by archShade View Post
Programming languages describe what data to send to various parts of the computer and what to do with the resultant data where as HDL defines the structure of hardware.

They share constructs and act in a similar way but do actually do a different job. Although under synthesis HDLs essential do what programming languages do when applied to an FPGA they work differently.

Because they are so similar I would have thought GPL would cover HDLs but not sure (thus asking).
No, Verilog doesn't do a different job. Look up "System C" and realize it's C++ with set of special classes in order to be a good enough as HDL.

Verilog is just a (pseudo-parallel) programming language with built-in threads which are called differently - 'always', 'fork .. join', etc.

At Verilog level of detail 'reg' (typically represented in HW by a edge-triggered flip-flop) is no different from a variable in, say, "C".

Verilog's 'pmos' and 'nmos' are funny in a sense they have conductance in one directions - I once used this deficiency to achieve something quite positive and useful.

...

You might be interested to look up

Petri Nets
.
 
Old 10-16-2010, 04:20 AM   #5
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,123

Rep: Reputation: 407Reputation: 407Reputation: 407Reputation: 407Reputation: 407
To make my point more clear. Suppose you have the following piece of Verilog code:

Code:
reg r;
always(@posedge clk)
  r = i;
It can be represented simplistically by the following C99 code:

Code:
bool clk; // is set by a different thread
bool ___prev_clk = false; // additional variable needed to detect clk transitions
bool r;
bool i; // is set by a different thread

int main()
  {
  for(;;)
    {
    if(clk && !___prev_clk)
      {
      // if we are here, 'posedge' has just happened
      r = i;
      }

    ___prev_clk = clk;
    }
  }
.

I.e. there is nothing special in Verilog - except convenience for the purpose .

Last edited by Sergei Steshenko; 10-16-2010 at 04:24 AM.
 
Old 10-16-2010, 10:25 AM   #6
archShade
Member
 
Registered: Mar 2006
Location: Manchester England
Distribution: Debian, Slackware, Xandros (ASUS EEE);
Posts: 163

Original Poster
Rep: Reputation: 22
In simulation I would agree that verilog works in the same way as programming languages. I write the code pass it though a compiler (iverilog) and run it (using vvp) all this I could do with systemC but verilog is designed to not only run in this simulated way but also when put though software such as Quartus produce files that have full description off electronic layout, so that it can be applied to a FPGA as firmware or used directly in IC production.

When The design is implemented in this way it no longer takes the guise of a pseudo parallel programming language as those gates really are working in parallel.
 
  


Reply

Tags
gpl, hdl, verilog


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Biometric Hardware with Linux and GPL violations LXer Syndicated Linux News 0 09-10-2010 09:40 AM
mknod hdl / hdk problem renski Linux - General 1 07-15-2006 09:13 PM
languages of linux: which languages can be choosen in suse and red-hat distributions? Klaus Schnorr Linux - Software 3 09-10-2005 02:19 AM
Dont we need GPL licencse for hardware vendors askjha Linux - General 2 10-19-2004 02:17 PM


All times are GMT -5. The time now is 03:44 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration