trampgeek / jobe

jobe is a server that runs small programming jobs in a variety of programming languages
MIT License
110 stars 79 forks source link

VHDL support #37

Closed leboulec closed 4 years ago

leboulec commented 4 years ago

Hello,

My professors, my classmate and I are planning to add VHDL type questions to Coderunner. With this pull request, we want to add VHDL language support to Jobe.

We chose ghdl-gcc as a compiler because it's free and it fully supports the main version of the language. I installed it with apt-get install ghdl-gcc on Ubuntu 20.04.

To compile a VHDL program, we must provide the name of the top entity to the compiler. I chose to put a limitation on it, so that the name of the top entity must be named test_bench. Therefore, the name of the entity will be defined in the coderunner template, so that the teacher will only have to write the architecture of his test bench in the Test case field.

I also added a unit test (4 to 1 multiplexer with test bench) in testsubmit.py.

Regards, Clément Leboulenger

trampgeek commented 4 years ago

Hi Clément

Thanks for the contribution. I'm on holiday at present and haven't looked at your contribution but I'll be back at work next week and hope to look then.

I have been trying not to add new languages to Jobe in recent years because nowadays we run nearly all languages via a Python script. That avoids us having to update Jobe and reduces on-going maintenance costs. The technique is described here: https://github.com/trampgeek/moodle-qtype_coderunner#supporting-or-implementing-new-languages

Apart from the reduced maintenance costs, it also proves convenient to use Python as an intermediate language because it provides good support for pre-checking and analysing student submissions. The overhead seems to be negligible.

Did you consider that option?

Regards

Richard

leboulec commented 4 years ago

Hi,

Thank you for taking the time to reply.

This option seems indeed better. I thought I had to add a support for the language in the sandbox. Nevertheless it was a good experience for me to learn how Jobe works.

VHDL is a widely used language in Europe as it is the standard hardware description language in the industry. It is taught in my university and in others so I wanted to make vhdl coderunner questions avaliable for everyone. According to you, should I submit a template in coderunner's repository or should I host it on my own github page?

Regards, Clément Leboulenger

trampgeek commented 4 years ago

Hi Clément

I'd appreciate it if you'd post a template to the CodeRunner question author's forum once it has been developed. I think that is more likely to come up in a web search for "coderunner VHDL" than a private github repo.

Thanks

Richard